diff --git a/ext/intl/common/common_date.cpp b/ext/intl/common/common_date.cpp index e4f442a8195..e27a67ec55a 100644 --- a/ext/intl/common/common_date.cpp +++ b/ext/intl/common/common_date.cpp @@ -124,6 +124,7 @@ U_CFUNC zend_result intl_datetime_decompose(zend_object *obj, double *millis, Ti } // TODO: Remove this when DateTimeInterface::getTimestamp() no longer has a tentative return type if (Z_TYPE(retval) != IS_LONG) { + zval_ptr_dtor(&retval); spprintf(&message, 0, "%s: %s::getTimestamp() did not return an int", func, ZSTR_VAL(obj->ce->name)); intl_errors_set(err, U_INTERNAL_PROGRAM_ERROR, message, 1); efree(message);