From: Andrey Hristov Date: Thu, 29 Apr 2010 13:19:57 +0000 (+0000) Subject: Add a test case for the recently fixed memleak X-Git-Tag: php-5.3.3RC1~234 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b72437494b872d5fd94623dad0e608f6720aef86;p=php Add a test case for the recently fixed memleak --- diff --git a/ext/mysqli/tests/mysqli_options.phpt b/ext/mysqli/tests/mysqli_options.phpt index 1d5955b55e..de23adefad 100644 --- a/ext/mysqli/tests/mysqli_options.phpt +++ b/ext/mysqli/tests/mysqli_options.phpt @@ -53,6 +53,10 @@ already through other measures. $link = mysqli_init(); + /* set it twice, checking if memory for the previous one is correctly freed */ + mysqli_options($link, MYSQLI_SET_CHARSET_NAME, "utf8"); + mysqli_options($link, MYSQLI_SET_CHARSET_NAME, "latin1"); + if (!is_null($tmp = @mysqli_options($link, MYSQLI_OPT_CONNECT_TIMEOUT))) printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);