From: Stanislav Malyshev Date: Mon, 21 Oct 2013 07:01:24 +0000 (-0700) Subject: fix memory leak on error (from Coverity scan) X-Git-Tag: php-5.5.6RC1~5^2~8^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f860486de5805eefd63af5d750c913e1515970c8;p=php fix memory leak on error (from Coverity scan) --- diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 70960b161f..7e4de09c1e 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -1362,6 +1362,7 @@ PHPAPI signed long php_parse_date(char *string, signed long *now) parsed_time = timelib_strtotime(string, strlen(string), &error, DATE_TIMEZONEDB, php_date_parse_tzfile_wrapper); if (error->error_count) { + timelib_time_dtor(parsed_time); timelib_error_container_dtor(error); return -1; }