diff options
author | Xinchen Hui <laruence@php.net> | 2013-04-27 23:36:56 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2013-04-27 23:38:00 +0800 |
commit | c7b8368ed579ddd539af95427902215f0530b4ea (patch) | |
tree | 12dec2ea0b7e93222bf1946ff93b5562ce0a5105 /ext/mysqli | |
parent | bf5506f511e66a2b827988d611ccda4d75abc44e (diff) | |
download | php-git-c7b8368ed579ddd539af95427902215f0530b4ea.tar.gz |
Fix memory realted to #64726
Diffstat (limited to 'ext/mysqli')
-rw-r--r-- | ext/mysqli/tests/bug64726.phpt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ext/mysqli/tests/bug64726.phpt b/ext/mysqli/tests/bug64726.phpt new file mode 100644 index 0000000000..3e43916d35 --- /dev/null +++ b/ext/mysqli/tests/bug64726.phpt @@ -0,0 +1,23 @@ +--TEST-- +Bug #63398 (Memleak when calling fetch_object on a use_result and DB pointer has closed) +--SKIPIF-- +<?php +require_once('skipif.inc'); +require_once("connect.inc"); +if (!$IS_MYSQLND) { + die("skip mysqlnd only test"); +} +require_once('skipifconnectfailure.inc'); +?> +--FILE-- +<?php +require 'connect.inc'; +$db = new my_mysqli($host, $user, $passwd, $db, $port, $socket); + +$result = $db->query('SELECT 1', MYSQLI_USE_RESULT); +$db->close(); +var_dump($result->fetch_array()); +?> +--EXPECTF-- +Warning: mysqli_result::fetch_array(): Error while reading a row in %sbug64726.php on line %d +bool(false) |