]> granicus.if.org Git - php/commitdiff
Fixed recently introduced memory leak
authorDmitry Stogov <dmitry@zend.com>
Tue, 14 Apr 2015 12:47:26 +0000 (15:47 +0300)
committerStanislav Malyshev <stas@php.net>
Tue, 14 Apr 2015 18:08:38 +0000 (11:08 -0700)
ext/phar/phar.c

index c5c8b467bcda1519c98b257f3ba7c78f176cc115..223bfe84c633117896adf55fb080c62e72480175 100644 (file)
@@ -1113,6 +1113,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char
                        entry.metadata_len = 0;
                }
                if (len > endbuffer - buffer) {
+                       pefree(entry.filename, entry.is_persistent);
                        MAPPHAR_FAIL("internal corruption of phar \"%s\" (truncated manifest entry)");
                }
                if (phar_parse_metadata(&buffer, &entry.metadata, len TSRMLS_CC) == FAILURE) {