From: Tilghman Lesher Date: Tue, 7 Aug 2007 19:34:25 +0000 (+0000) Subject: Don't free the environment handle when the connection fails, because other connection... X-Git-Tag: 1.4.10~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=75a3499df030f8db54d7edfcc11d2f042eff6377;p=thirdparty%2Fasterisk.git Don't free the environment handle when the connection fails, because other connections might be depending upon it git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78437 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_odbc.c b/res/res_odbc.c index c6d796f56f..e523b98192 100644 --- a/res/res_odbc.c +++ b/res/res_odbc.c @@ -483,10 +483,7 @@ static odbc_status odbc_obj_connect(struct odbc_obj *obj) res = SQLAllocHandle(SQL_HANDLE_DBC, obj->parent->env, &obj->con); if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) { - ast_log(LOG_WARNING, "res_odbc: Error AllocHDB %d\n", res); - SQLFreeHandle(SQL_HANDLE_ENV, obj->parent->env); - ast_mutex_unlock(&obj->lock); return ODBC_FAIL; }