Release temporary string reference

This commit is contained in:
Sara Golemon 2017-06-25 19:37:36 -04:00
parent 04fb3f28ff
commit 24030d54d8
No known key found for this signature in database
GPG Key ID: DBDB397470D12172

View File

@ -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);