com php-src: fix double free: ext/intl/msgformat/msgformat_fo rmat.c

From: Date: Mon, 29 Aug 2016 17:27:47 +0000
Subject: com php-src: fix double free: ext/intl/msgformat/msgformat_fo rmat.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-94123@lists.php.net to get a copy of this message
Commit: 1a840b9af0117f6ac4c2030dc0f8c562a0f453ba Author: Anatol Belski <ab@php.net> Mon, 29 Aug 2016 19:27:47 +0200 Parents: e2609a38d9604d9daea5e4a31a6fb13d1cc24ab5 Branches: PHP-5.6 PHP-7.0 PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1a840b9af0117f6ac4c2030dc0f8c562a0f453ba Log: fix double free Changed paths: M ext/intl/msgformat/msgformat_format.c Diff: diff --git a/ext/intl/msgformat/msgformat_format.c b/ext/intl/msgformat/msgformat_format.c index 55ec9e8..25c9619 100644 --- a/ext/intl/msgformat/msgformat_format.c +++ b/ext/intl/msgformat/msgformat_format.c @@ -51,11 +51,10 @@ static void msgfmt_do_format(MessageFormatter_object *mfo, zval *args, zval *ret zend_hash_destroy(args_copy); efree(args_copy); - if (formatted && U_FAILURE(INTL_DATA_ERROR_CODE(mfo))) { - efree(formatted); - } - if (U_FAILURE(INTL_DATA_ERROR_CODE(mfo))) { + if (formatted) { + efree(formatted); + } RETURN_FALSE; } else { INTL_METHOD_RETVAL_UTF8(mfo, formatted, formatted_len, 1);

« previous php.cvs (#94123) next »