summaryrefslogtreecommitdiff
path: root/ext/mysql/php_mysql.c
diff options
context:
space:
mode:
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)++;
}