summaryrefslogtreecommitdiff
path: root/ext/date/php_date.c
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2013-10-21 00:02:33 -0700
committerStanislav Malyshev <stas@php.net>2013-10-21 00:02:33 -0700
commit19e8052be31d8361477906932f4c6dc9cd738de2 (patch)
tree6ad8291f1fc0da05f368c0324bc4db3d7ccf0561 /ext/date/php_date.c
parentae31a68774b9f530e7a4e2c0fed20eab16edb8e4 (diff)
parentcb47396d4601656173cffadf86f6342bcba5e2b7 (diff)
downloadphp-git-19e8052be31d8361477906932f4c6dc9cd738de2.tar.gz
Merge branch 'PHP-5.5'
* PHP-5.5: fix memory leak on error (from Coverity scan)
Diffstat (limited to 'ext/date/php_date.c')
-rw-r--r--ext/date/php_date.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index 7d3d1d739e..13a645117c 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -1406,6 +1406,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;
}