From 634fef42d64ceb435e15c6a08139aab3bf7403b8 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Sat, 8 Mar 2008 13:01:59 +0000 Subject: fix bug #44214: crash with preg_replace_callback and global variables --- ext/pcre/php_pcre.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/pcre/php_pcre.c') diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 512c88da71..5a32bd0d81 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -841,8 +841,8 @@ static int preg_do_repl_func(zval *function, char *subject, int *offsets, char * result_len = offsets[1] - offsets[0]; *result = estrndup(&subject[offsets[0]], result_len); } - zval_dtor(subpats); - FREE_ZVAL(subpats); + + zval_ptr_dtor(&subpats); return result_len; } -- cgit v1.2.1