From: Antony Dovgal Date: Tue, 3 Oct 2006 21:37:02 +0000 (+0000) Subject: leaks-- X-Git-Tag: RELEASE_1_0_0RC1~1442 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=df68f888ea159083e2008872aae42d3afcbd7890;p=php leaks-- fix test --- diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 1ae9d55162..00bac77193 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -1768,7 +1768,7 @@ PHP_FUNCTION(preg_quote) *q = '\0'; /* Reallocate string and return it */ - RETVAL_UTF8_STRINGL(erealloc(out_str, q - out_str + 1), q - out_str, 0); + RETVAL_UTF8_STRINGL(erealloc(out_str, q - out_str + 1), q - out_str, ZSTR_AUTOFREE); } /* }}} */ diff --git a/ext/pcre/tests/bug26927.phpt b/ext/pcre/tests/bug26927.phpt index 5c64deb37c..7e74d3cddd 100644 --- a/ext/pcre/tests/bug26927.phpt +++ b/ext/pcre/tests/bug26927.phpt @@ -9,3 +9,6 @@ Bug #26927 (preg_quote() does not escape \0) --EXPECT-- int(1) string(6) "a\000b" +--UEXPECT-- +int(1) +unicode(6) "a\000b"