fix memory leak on error (from Coverity scan)

This commit is contained in:
Stanislav Malyshev 2013-10-21 00:01:24 -07:00
parent 297324146e
commit f860486de5

View File

@ -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;
}