summaryrefslogtreecommitdiff
path: root/ext/mysql/php_mysql.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-04-09 16:48:03 +0400
committerDmitry Stogov <dmitry@zend.com>2014-04-09 16:48:03 +0400
commit79b27dc096db199dc29f88c60b033165a52ec809 (patch)
treebb187df469bfdb57650b3b0e9ff85cda8529f509 /ext/mysql/php_mysql.c
parentd9f6068fd3781498a3d8a6abb46264e835ecfe1f (diff)
downloadphp-git-79b27dc096db199dc29f88c60b033165a52ec809.tar.gz
Fixed reference counting
Diffstat (limited to 'ext/mysql/php_mysql.c')
-rw-r--r--ext/mysql/php_mysql.c2
1 files changed, 2 insertions, 0 deletions
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)++;
}