summaryrefslogtreecommitdiff
path: root/ext/mysqli/mysqli.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2008-06-24 13:19:29 +0000
committerAndrey Hristov <andrey@php.net>2008-06-24 13:19:29 +0000
commit943e9a577ba41cfc066e22640465f3bf1717faeb (patch)
tree7b7b7d5267de19fd821886ebcc550ad6425d4551 /ext/mysqli/mysqli.c
parentff83deb66d1ebbeb965888e7d19459bdd9488cf9 (diff)
downloadphp-git-943e9a577ba41cfc066e22640465f3bf1717faeb.tar.gz
Fix double-free, introduced lately
Diffstat (limited to 'ext/mysqli/mysqli.c')
-rw-r--r--ext/mysqli/mysqli.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c
index 2fc0b00cd0..f8350be3fb 100644
--- a/ext/mysqli/mysqli.c
+++ b/ext/mysqli/mysqli.c
@@ -232,6 +232,9 @@ static void mysqli_link_free_storage(void *object TSRMLS_DC)
MY_MYSQL *mysql = (MY_MYSQL *)my_res->ptr;
if (mysql->mysql) {
if (!mysql->persistent) {
+#ifdef MYSQLI_USE_MYSQLND
+ mysqlnd_end_psession(mysql->mysql);
+#endif
mysqli_close(mysql->mysql, MYSQLI_CLOSE_IMPLICIT);
} else {
zend_rsrc_list_entry *le;