com php-src: Fixed reference counting: ext/mysql/php_mysql. c
| From: | Dmitry Stogov | Date: | Wed, 09 Apr 2014 12:48:03 +0000 |
| Subject: | com php-src: Fixed reference counting: ext/mysql/php_mysql. c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-77460@lists.php.net to get a copy of this message | ||
Commit: 79b27dc096db199dc29f88c60b033165a52ec809
Author: Dmitry Stogov <dmitry@zend.com> Wed, 9 Apr 2014 16:48:03 +0400
Parents: d9f6068fd3781498a3d8a6abb46264e835ecfe1f
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=79b27dc096db199dc29f88c60b033165a52ec809
Log:
Fixed reference counting
Changed paths:
M ext/mysql/php_mysql.c
Diff:
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c
index 02e950a..95d290e 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)++;
}