From: Ilia Alshanetsky Date: Fri, 7 Mar 2008 02:04:40 +0000 (+0000) Subject: Fixed a memory leak inside date_get_last_errors() when there are no errors X-Git-Tag: BEFORE_NEW_PARAMETER_PARSE~689 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bbf53bbb04125de735bb68204737f0dde34ab68e;p=php 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 436bd38cc1..9a9b5d61f4 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -1914,8 +1914,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;