Skip to content

Commit

Permalink
Release temporary string reference
Browse files Browse the repository at this point in the history
  • Loading branch information
sgolemon committed Jun 25, 2017
1 parent 04fb3f2 commit 24030d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ext/intl/dateformat/dateformat_create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 24030d5

Please sign in to comment.