Bug #16132 Updated: odbc connection closed twice

From: Date: Fri, 26 Apr 2002 14:58:07 +0000
Subject: Bug #16132 Updated: odbc connection closed twice
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-6123@lists.php.net to get a copy of this message
ID: 16132 Updated by: kalowsky@php.net Reported By: kolian@bigfoot.com -Status: Open +Status: Closed Bug Type: ODBC related Operating System: Win2k PHP Version: 4.1.2 New Comment: This bug has been fixed in CVS. Thanks for your report. Previous Comments: ------------------------------------------------------------------------ [2002-03-18 00:58:19] kolian@bigfoot.com The code in php_odbc.c, that checks if a persistent connections still alive, when finds a bad connection will try to deallocate the connection twice causing Access Violation in SQLServer ODBC driver zend_hash_del will make a call to _close_odbc_connection through destruction process. safe_odbc_disconnect(db_conn->hdbc); SQLFreeConnect(db_conn->hdbc); Aren't nessessary here and will cause Access Violation in SQLServer driver. Line 2125 in php_odbc.c if(ODBCG(check_persistent)){ RETCODE ret; UCHAR d_name[32]; SWORD len; ret = SQLGetInfo(db_conn->hdbc, SQL_DATA_SOURCE_READ_ONLY, d_name, sizeof(d_name), &len); if(ret != SQL_SUCCESS || len == 0) { zend_hash_del(&EG(persistent_list), hashed_details, hashed_len + 1); safe_odbc_disconnect(db_conn->hdbc); SQLFreeConnect(db_conn->hdbc); goto try_and_get_another_connection; } } } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=16132&edit=1

« previous php.bugs (#6123) next »