com php-src: Fix leak in intl collator compare function: ext/intl/collator/collator_sort.c

From: Date: Sat, 16 Jul 2016 21:16:20 +0000
Subject: com php-src: Fix leak in intl collator compare function: ext/intl/collator/collator_sort.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-93044@lists.php.net to get a copy of this message
Commit: 267c525820a46a45aec05f1963978fdfe1ae291f Author: Nikita Popov <nikic@php.net> Thu, 14 Jul 2016 22:01:13 +0200 Parents: 02428455362cd73f01aeac0deed69fd1c6703930 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=267c525820a46a45aec05f1963978fdfe1ae291f Log: Fix leak in intl collator compare function Changed paths: M ext/intl/collator/collator_sort.c Diff: diff --git a/ext/intl/collator/collator_sort.c b/ext/intl/collator/collator_sort.c index 6962955..4fc5f6a 100644 --- a/ext/intl/collator/collator_sort.c +++ b/ext/intl/collator/collator_sort.c @@ -76,7 +76,8 @@ static int collator_regular_compare_function(zval *result, zval *op1, zval *op2) intl_errors_set_custom_msg( COLLATOR_ERROR_P( co ), "Object not initialized", 0 ); zend_throw_error(NULL, "Object not initialized"); - return FAILURE; + rc = FAILURE; + goto cleanup; } /* Compare the strings using ICU. */ @@ -126,6 +127,7 @@ static int collator_regular_compare_function(zval *result, zval *op1, zval *op2) zval_ptr_dtor( norm2_p ); } +cleanup: if( num1_p ) zval_ptr_dtor( num1_p );

« previous php.cvs (#93044) next »