Skip to content

Commit fd08238

Browse files
committed
Fix memory leak in intl_datetime_decompose()
1 parent 910aeaa commit fd08238

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/intl/common/common_date.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz,
118118
ZVAL_STRING(&zfuncname, "getTimestamp");
119119
if (call_user_function(NULL, z, &zfuncname, &retval, 0, NULL)
120120
!= SUCCESS || Z_TYPE(retval) != IS_LONG) {
121+
zval_ptr_dtor(&retval);
121122
spprintf(&message, 0, "%s: error calling ::getTimeStamp() on the "
122123
"object", func);
123124
intl_errors_set(err, U_INTERNAL_PROGRAM_ERROR,

0 commit comments

Comments
 (0)