git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@129741 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2008-07-10 21:19:48 +00:00
parent 5f919770b0
commit 74c78a9e3a

View File

@@ -132,8 +132,10 @@ static struct ast_variable *realtime_odbc(const char *database, const char *tabl
}
newparam = va_arg(aq, const char *);
if (!newparam)
if (!newparam) {
ast_odbc_release_obj(obj);
return NULL;
}
newval = va_arg(aq, const char *);
op = !strchr(newparam, ' ') ? " =" : "";
snprintf(sql, sizeof(sql), "SELECT * FROM %s WHERE %s%s ?%s", table, newparam, op,