Skip to content

Commit 24030d5

Browse files
committed
Release temporary string reference
1 parent 04fb3f2 commit 24030d5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ext/intl/dateformat/dateformat_create.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,9 @@ U_CFUNC PHP_METHOD( IntlDateFormatter, __construct )
216216
return_value = getThis();
217217
if (datefmt_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1) == FAILURE) {
218218
if (!EG(exception)) {
219-
zend_throw_exception(IntlException_ce_ptr, ZSTR_VAL(intl_error_get_message(NULL)), intl_error_get_code(NULL));
219+
zend_string *err = intl_error_get_message(NULL);
220+
zend_throw_exception(IntlException_ce_ptr, ZSTR_VAL(err), intl_error_get_code(NULL));
221+
zend_string_release(err);
220222
}
221223
}
222224
zend_restore_error_handling(&error_handling);

0 commit comments

Comments
 (0)