From 90805f6d025f3d422fd136bb9bdcd3ac79acea83 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 16 Feb 2012 10:40:56 -0600 Subject: [PATCH] revert part of last patch --- src/switch_odbc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/switch_odbc.c b/src/switch_odbc.c index 705587d5ba..24a25cb0af 100644 --- a/src/switch_odbc.c +++ b/src/switch_odbc.c @@ -605,8 +605,10 @@ SWITCH_DECLARE(switch_odbc_status_t) switch_odbc_handle_callback_exec_detailed(c free(vals); } + SQLFreeHandle(SQL_HANDLE_STMT, stmt); + stmt = NULL; /* Make sure we don't try to free this handle again */ + if (!err_cnt) { - SQLFreeHandle(SQL_HANDLE_STMT, stmt); return SWITCH_ODBC_SUCCESS; }