From df68f888ea159083e2008872aae42d3afcbd7890 Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Tue, 3 Oct 2006 21:37:02 +0000 Subject: [PATCH] leaks-- fix test --- ext/pcre/php_pcre.c | 2 +- ext/pcre/tests/bug26927.phpt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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" -- 2.50.1