diff options
author | Andrey Hristov <andrey@php.net> | 2010-09-30 18:10:03 +0000 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2010-09-30 18:10:03 +0000 |
commit | 60327d87a7599ce5288a9fb7675f20f3ec29c7ff (patch) | |
tree | 645dd352c9ac5c2f6dce41feac3b7c11182c839e /ext/mysqli/mysqli.c | |
parent | 5c6f0ebeabd5ee4d8bd79f158fd7ee968ac28c0d (diff) | |
download | php-git-60327d87a7599ce5288a9fb7675f20f3ec29c7ff.tar.gz |
Plug a leak in mysqli when in the same script
a pconn is reused.
Call end_psession earlier - so will mysqlnd and
the plugins free data earlier.
Diffstat (limited to 'ext/mysqli/mysqli.c')
-rw-r--r-- | ext/mysqli/mysqli.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index 0325e89ce5..b45622920d 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -893,7 +893,8 @@ PHP_RSHUTDOWN_FUNCTION(mysqli) if (MyG(error_msg)) { efree(MyG(error_msg)); } -#ifdef MYSQLI_USE_MYSQLND +#ifdef A0 && MYSQLI_USE_MYSQLND + /* psession is being called when the connection is freed - explicitly or implicitly */ zend_hash_apply(&EG(persistent_list), (apply_func_t) php_mysqli_persistent_helper_once TSRMLS_CC); #endif return SUCCESS; |