]> granicus.if.org Git - php/commitdiff
fix memory leak on error (from Coverity scan)
authorStanislav Malyshev <stas@php.net>
Mon, 21 Oct 2013 07:01:24 +0000 (00:01 -0700)
committerStanislav Malyshev <stas@php.net>
Mon, 21 Oct 2013 07:01:24 +0000 (00:01 -0700)
ext/date/php_date.c

index 70960b161f627ee5ca90a1976557728d8c23fe68..7e4de09c1ec7e812d9efa400df7b88bd29b30d4b 100644 (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;
        }