This commit is contained in:
Anthony Minessale 2010-12-08 20:38:16 -06:00
parent 14113f23b1
commit 5aba96e382
1 changed files with 5 additions and 5 deletions

View File

@ -160,11 +160,6 @@ static int db_is_up(switch_odbc_handle_t *handle)
strcpy((char *) sql, "select 1");
}
if (stmt) {
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
stmt = NULL;
}
if (SQLAllocHandle(SQL_HANDLE_STMT, handle->con, &stmt) != SQL_SUCCESS) {
code = __LINE__;
goto error;
@ -229,6 +224,11 @@ static int db_is_up(switch_odbc_handle_t *handle)
goto done;
}
if (stmt) {
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
stmt = NULL;
}
switch_safe_free(err_str);
switch_yield(1000000);
goto top;