summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSara Golemon <pollita@php.net>2017-06-25 19:37:36 -0400
committerSara Golemon <pollita@php.net>2017-06-25 19:39:13 -0400
commit24030d54d86e4b54055b9668d90e5680d8167094 (patch)
treec1bfbf50c2e25e4302229e08c7474c8adf9f442a
parent04fb3f28ff677d036cfaf902f07b75f0346a5c33 (diff)
downloadphp-git-24030d54d86e4b54055b9668d90e5680d8167094.tar.gz
Release temporary string reference
-rw-r--r--ext/intl/dateformat/dateformat_create.cpp4
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);