Skip to content

Commit f860486

Browse files
committed
fix memory leak on error (from Coverity scan)
1 parent 2973241 commit f860486

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
@@ -1362,6 +1362,7 @@ PHPAPI signed long php_parse_date(char *string, signed long *now)
13621362

13631363
parsed_time = timelib_strtotime(string, strlen(string), &error, DATE_TIMEZONEDB, php_date_parse_tzfile_wrapper);
13641364
if (error->error_count) {
1365+
timelib_time_dtor(parsed_time);
13651366
timelib_error_container_dtor(error);
13661367
return -1;
13671368
}

0 commit comments

Comments
 (0)