]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Oops
authorTilghman Lesher <tilghman@meg.abyt.es>
Thu, 10 Jul 2008 21:19:48 +0000 (21:19 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Thu, 10 Jul 2008 21:19:48 +0000 (21:19 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@129741 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_config_odbc.c

index af85f0a6a597ffb6f453bc47745aefd39f41ff1d..7f11b5db356123b6bddd8404d6a1dd4cb05e00fe 100644 (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,