mirror of
https://github.com/php/php-src.git
synced 2024-12-11 10:54:47 +08:00
fix memory leak on error (from Coverity scan)
This commit is contained in:
parent
297324146e
commit
f860486de5
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user