From: Sara Golemon Date: Sun, 25 Jun 2017 23:37:36 +0000 (-0400) Subject: Release temporary string reference X-Git-Tag: php-7.2.0alpha3~34^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=24030d54d86e4b54055b9668d90e5680d8167094;p=php Release temporary string reference --- diff --git a/ext/intl/dateformat/dateformat_create.cpp b/ext/intl/dateformat/dateformat_create.cpp index e060711ce6..f08e0ed3f3 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);