Skip to content

Commit 5e21ffe

Browse files
committed
Merge branch 'PHP-8.4'
* PHP-8.4: Fix memory leak in intl_datetime_decompose()
2 parents 2a9ea2c + 7efe96d commit 5e21ffe

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
@@ -124,6 +124,7 @@ U_CFUNC zend_result intl_datetime_decompose(zend_object *obj, double *millis, Ti
124124
}
125125
// TODO: Remove this when DateTimeInterface::getTimestamp() no longer has a tentative return type
126126
if (Z_TYPE(retval) != IS_LONG) {
127+
zval_ptr_dtor(&retval);
127128
spprintf(&message, 0, "%s: %s::getTimestamp() did not return an int", func, ZSTR_VAL(obj->ce->name));
128129
intl_errors_set(err, U_INTERNAL_PROGRAM_ERROR, message, 1);
129130
efree(message);

0 commit comments

Comments
 (0)