From: Scott MacVicar Date: Mon, 8 Jun 2009 21:52:08 +0000 (+0000) Subject: MFH fix bug #44214: crash with preg_replace_callback and global variables X-Git-Tag: php-5.2.10RC2~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=17dc898a726a6ff25b09e1b919db8912dacb62aa;p=php MFH fix bug #44214: crash with preg_replace_callback and global variables --- diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index bcf9c425fa..d8cb0ee3da 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -842,8 +842,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; }