com php-src: fix memory leak on error (from Coverity scan): ext/date/php_date.c

From: Date: Mon, 21 Oct 2013 07:01:24 +0000
Subject: com php-src: fix memory leak on error (from Coverity scan): ext/date/php_date.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-73764@lists.php.net to get a copy of this message
Commit: f860486de5805eefd63af5d750c913e1515970c8 Author: Stanislav Malyshev <stas@php.net> Mon, 21 Oct 2013 00:01:24 -0700 Parents: 297324146e772fc41d79c23511f66d7d66f6784c Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f860486de5805eefd63af5d750c913e1515970c8 Log: fix memory leak on error (from Coverity scan) Changed paths: M ext/date/php_date.c Diff: diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 70960b1..7e4de09 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; }

« previous php.cvs (#73764) next »