com php-src: Release temporary string reference: ext/intl/datef ormat/dateformat_create.cpp

From: Date: Sun, 25 Jun 2017 23:39:13 +0000
Subject: com php-src: Release temporary string reference: ext/intl/datef ormat/dateformat_create.cpp
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-98228@lists.php.net to get a copy of this message
Commit: 24030d54d86e4b54055b9668d90e5680d8167094 Author: Sara Golemon <pollita@php.net> Sun, 25 Jun 2017 19:37:36 -0400 Parents: 04fb3f28ff677d036cfaf902f07b75f0346a5c33 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=24030d54d86e4b54055b9668d90e5680d8167094 Log: Release temporary string reference Changed paths: M ext/intl/dateformat/dateformat_create.cpp Diff: diff --git a/ext/intl/dateformat/dateformat_create.cpp b/ext/intl/dateformat/dateformat_create.cpp index e060711..f08e0ed 100644 --- a/ext/intl/dateformat/dateformat_create.cpp +++ b/ext/intl/dateformat/dateformat_create.cpp @@ -216,7 +216,9 @@ U_CFUNC PHP_METHOD( IntlDateFormatter, __construct ) return_value = getThis(); if (datefmt_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1) == FAILURE) { if (!EG(exception)) { - zend_throw_exception(IntlException_ce_ptr, ZSTR_VAL(intl_error_get_message(NULL)), intl_error_get_code(NULL)); + zend_string *err = intl_error_get_message(NULL); + zend_throw_exception(IntlException_ce_ptr, ZSTR_VAL(err), intl_error_get_code(NULL)); + zend_string_release(err); } } zend_restore_error_handling(&error_handling);

« previous php.cvs (#98228) next »