@@ -667,7 +667,8 @@ int phar_parse_zipfile(php_stream *fp, char *fname, size_t fname_len, char *alia
667667 }
668668 }
669669
670- if (!entry .uncompressed_filesize || !actual_alias ) {
670+ if (!entry .uncompressed_filesize ) {
671+ efree (actual_alias );
671672 php_stream_filter_remove (filter , 1 );
672673 zend_string_release_ex (entry .filename , entry .is_persistent );
673674 PHAR_ZIP_FAIL ("unable to read in alias, truncated" );
@@ -700,7 +701,8 @@ int phar_parse_zipfile(php_stream *fp, char *fname, size_t fname_len, char *alia
700701 }
701702 }
702703
703- if (!entry .uncompressed_filesize || !actual_alias ) {
704+ if (!entry .uncompressed_filesize ) {
705+ efree (actual_alias );
704706 php_stream_filter_remove (filter , 1 );
705707 zend_string_release_ex (entry .filename , entry .is_persistent );
706708 PHAR_ZIP_FAIL ("unable to read in alias, truncated" );
@@ -723,7 +725,8 @@ int phar_parse_zipfile(php_stream *fp, char *fname, size_t fname_len, char *alia
723725 }
724726 }
725727
726- if (!entry .uncompressed_filesize || !actual_alias ) {
728+ if (!entry .uncompressed_filesize ) {
729+ efree (actual_alias );
727730 zend_string_release_ex (entry .filename , entry .is_persistent );
728731 PHAR_ZIP_FAIL ("unable to read in alias, truncated" );
729732 }
0 commit comments