From: Ilia Alshanetsky Date: Fri, 7 Mar 2008 02:05:48 +0000 (+0000) Subject: MFB: Fixed a memory leak inside date_get_last_errors() when there are no X-Git-Tag: RELEASE_2_0_0a1~236 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e9c77a5e9251306cf388aa2d874767269542c3fd;p=php MFB: Fixed a memory leak inside date_get_last_errors() when there are no errors --- 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;