aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-11-13 05:45:11 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-11-13 05:45:11 +0000
commit830dd3c78910a09fc0e7fa2ffb5a5c77b7ab8b02 (patch)
tree5f6c0428ae56e6c814ca570c7bd298f7d19f412c /res
parentdbf1009d7e2bfcbbae98746a2377d8d6b8ca1c26 (diff)
If the execute fails a second time, make sure that we don't pass back a stale handle
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@47525 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_odbc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/res/res_odbc.c b/res/res_odbc.c
index cc4b61f2d..92cd1ccfb 100644
--- a/res/res_odbc.c
+++ b/res/res_odbc.c
@@ -140,6 +140,7 @@ SQLHSTMT odbc_prepare_and_execute(odbc_obj *obj, SQLHSTMT (*prepare_cb)(odbc_obj
ast_log(LOG_WARNING, "SQL Execute error %d! Attempting a reconnect...\n", res);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
+ stmt = NULL;
ast_mutex_lock(&obj->lock);
obj->up = 0;