summaryrefslogtreecommitdiff
path: root/ext/mysqli/mysqli.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2010-05-13 11:05:09 +0000
committerAndrey Hristov <andrey@php.net>2010-05-13 11:05:09 +0000
commit6cefa510d606d6161bd1df709c2912dff75ecaec (patch)
treeeff69c729a809f2873246c774d1f8ca4bacaa350 /ext/mysqli/mysqli.c
parentfdfdb1480e81fe12402efc0480512982f40aacf2 (diff)
downloadphp-git-6cefa510d606d6161bd1df709c2912dff75ecaec.tar.gz
Better fix for #51605
Diffstat (limited to 'ext/mysqli/mysqli.c')
-rw-r--r--ext/mysqli/mysqli.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c
index 3ee998bd7f..61b806a348 100644
--- a/ext/mysqli/mysqli.c
+++ b/ext/mysqli/mysqli.c
@@ -222,10 +222,11 @@ static void mysqli_link_free_storage(void *object TSRMLS_DC)
if (my_res && my_res->ptr) {
MY_MYSQL *mysql = (MY_MYSQL *)my_res->ptr;
if (mysql->mysql) {
- php_mysqli_close(mysql, MYSQLI_CLOSE_EXPLICIT TSRMLS_CC);
+ php_mysqli_close(mysql, MYSQLI_CLOSE_EXPLICIT, my_res->status TSRMLS_CC);
}
php_clear_mysql(mysql);
efree(mysql);
+ my_res->status = MYSQLI_STATUS_UNKNOWN;
}
mysqli_objects_free_storage(object TSRMLS_CC);
}