com php-src: Fixed memleak: ext/pcre/php_pcre.c

From: Date: Sat, 21 Mar 2015 12:17:04 +0000
Subject: com php-src: Fixed memleak: ext/pcre/php_pcre.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-85746@lists.php.net to get a copy of this message
Commit: a4529cc0e51d81432d8786448bea8b5f137d2cc3 Author: Xinchen Hui <laruence@php.net> Sat, 21 Mar 2015 20:17:04 +0800 Parents: 8aa76a5bdd1204a2ec0483d08ad9d0c66f1b3b42 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a4529cc0e51d81432d8786448bea8b5f137d2cc3 Log: Fixed memleak Changed paths: M ext/pcre/php_pcre.c Diff: diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 99ef020..06f6179 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -1518,14 +1518,15 @@ static PHP_FUNCTION(preg_replace_callback_array) ZVAL_STR_COPY(&regex, str_idx); } else { php_error_docref(NULL, E_WARNING, "Delimiter must not be alphanumeric or backslash"); - zval_dtor(return_value); + zval_ptr_dtor(return_value); RETURN_NULL(); } if (!zend_is_callable(replace, 0, &callback_name)) { php_error_docref(NULL, E_WARNING, "'%s' is not a valid callback", callback_name->val); zend_string_release(callback_name); - zval_dtor(return_value); + zval_ptr_dtor(&regex); + zval_ptr_dtor(return_value); ZVAL_COPY(return_value, subject); return; } @@ -1547,7 +1548,7 @@ static PHP_FUNCTION(preg_replace_callback_array) ZVAL_COPY_VALUE(return_value, &zv); if (UNEXPECTED(EG(exception))) { - zval_dtor(return_value); + zval_ptr_dtor(return_value); RETURN_NULL(); } } ZEND_HASH_FOREACH_END();

« previous php.cvs (#85746) next »