From: Dmitry Stogov Date: Wed, 9 Apr 2014 12:48:03 +0000 (+0400) Subject: Fixed reference counting X-Git-Tag: POST_PHPNG_MERGE~412^2~143 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=79b27dc096db199dc29f88c60b033165a52ec809;p=php Fixed reference counting --- diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c index 02e950a328..95d290e333 100644 --- a/ext/mysql/php_mysql.c +++ b/ext/mysql/php_mysql.c @@ -1059,9 +1059,11 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) new_index_ptr.type = le_index_ptr; if (zend_hash_update_mem(&EG(regular_list), hashed_details, &new_index_ptr, sizeof(zend_resource)) == NULL) { + zval_ptr_dtor(return_value); STR_RELEASE(hashed_details); MYSQL_DO_CONNECT_RETURN_FALSE(); } + Z_ADDREF_P(return_value); MySG(num_links)++; }