From e9c77a5e9251306cf388aa2d874767269542c3fd Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Fri, 7 Mar 2008 02:05:48 +0000 Subject: [PATCH] MFB: Fixed a memory leak inside date_get_last_errors() when there are no errors --- ext/date/php_date.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 2c278a7a51..1c0e1e40e6 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -2039,8 +2039,8 @@ void zval_from_error_container(zval *z, timelib_error_container *error) */ PHP_FUNCTION(date_get_last_errors) { - array_init(return_value); if (DATEG(last_errors)) { + array_init(return_value); zval_from_error_container(return_value, DATEG(last_errors)); } else { RETURN_FALSE; -- 2.50.1