diff options
| author | Sara Golemon <pollita@php.net> | 2017-06-25 19:37:36 -0400 |
|---|---|---|
| committer | Sara Golemon <pollita@php.net> | 2017-06-25 19:39:13 -0400 |
| commit | 24030d54d86e4b54055b9668d90e5680d8167094 (patch) | |
| tree | c1bfbf50c2e25e4302229e08c7474c8adf9f442a | |
| parent | 04fb3f28ff677d036cfaf902f07b75f0346a5c33 (diff) | |
| download | php-git-24030d54d86e4b54055b9668d90e5680d8167094.tar.gz | |
Release temporary string reference
| -rw-r--r-- | ext/intl/dateformat/dateformat_create.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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); |
