@@ -674,7 +674,8 @@ int phar_parse_zipfile(php_stream *fp, char *fname, size_t fname_len, char *alia
674674 }
675675 }
676676
677- if (!entry .uncompressed_filesize || !actual_alias ) {
677+ if (!entry .uncompressed_filesize ) {
678+ efree (actual_alias );
678679 php_stream_filter_remove (filter , 1 );
679680 zend_string_release_ex (entry .filename , entry .is_persistent );
680681 PHAR_ZIP_FAIL ("unable to read in alias, truncated" );
@@ -707,7 +708,8 @@ int phar_parse_zipfile(php_stream *fp, char *fname, size_t fname_len, char *alia
707708 }
708709 }
709710
710- if (!entry .uncompressed_filesize || !actual_alias ) {
711+ if (!entry .uncompressed_filesize ) {
712+ efree (actual_alias );
711713 php_stream_filter_remove (filter , 1 );
712714 zend_string_release_ex (entry .filename , entry .is_persistent );
713715 PHAR_ZIP_FAIL ("unable to read in alias, truncated" );
@@ -730,7 +732,8 @@ int phar_parse_zipfile(php_stream *fp, char *fname, size_t fname_len, char *alia
730732 }
731733 }
732734
733- if (!entry .uncompressed_filesize || !actual_alias ) {
735+ if (!entry .uncompressed_filesize ) {
736+ efree (actual_alias );
734737 zend_string_release_ex (entry .filename , entry .is_persistent );
735738 PHAR_ZIP_FAIL ("unable to read in alias, truncated" );
736739 }
0 commit comments