Skip to content

Commit cb47396

Browse files
committed
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4: fix memory leak on error (from Coverity scan)
2 parents 0069792 + f860486 commit cb47396

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/date/php_date.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,6 +1406,7 @@ PHPAPI signed long php_parse_date(char *string, signed long *now)
14061406

14071407
parsed_time = timelib_strtotime(string, strlen(string), &error, DATE_TIMEZONEDB, php_date_parse_tzfile_wrapper);
14081408
if (error->error_count) {
1409+
timelib_time_dtor(parsed_time);
14091410
timelib_error_container_dtor(error);
14101411
return -1;
14111412
}

0 commit comments

Comments
 (0)