From 4e2be45309f02ff1fa7305d33d45e64d773d1b24 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 16 Apr 2015 21:43:19 +0200 Subject: [PATCH] Fix leak in IntlCalendar::fromDateTime() --- ext/intl/calendar/calendar_methods.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/intl/calendar/calendar_methods.cpp b/ext/intl/calendar/calendar_methods.cpp index c8acf5fe54..ac5b33a89c 100644 --- a/ext/intl/calendar/calendar_methods.cpp +++ b/ext/intl/calendar/calendar_methods.cpp @@ -1161,11 +1161,11 @@ U_CFUNC PHP_FUNCTION(intlcal_from_date_time) Z_OBJCE_P(zv_arg), php_date_get_date_ce()))) { object_init_ex(&zv_tmp, php_date_get_date_ce()); zend_call_method_with_1_params(&zv_tmp, NULL, NULL, "__construct", NULL, zv_arg); + zv_datetime = &zv_tmp; if (EG(exception)) { zend_object_store_ctor_failed(Z_OBJ(zv_tmp)); goto error; } - zv_datetime = &zv_tmp; } else { zv_datetime = zv_arg; } -- 2.40.0