Skip to content

Commit 7efe96d

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3: Fix memory leak in intl_datetime_decompose()
2 parents c00d7e0 + d6836fb commit 7efe96d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? ????, PHP 8.4.9
44

5+
- Intl:
6+
. Fix memory leak in intl_datetime_decompose() on failure. (nielsdos)
7+
58
- Phar:
69
. Add missing filter cleanups on phar failure. (nielsdos)
710

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)