@@ -346,6 +346,7 @@ int phar_parse_zipfile(php_stream *fp, char *fname, size_t fname_len, char *alia
346346 entry .fp_type = PHAR_FP ;
347347 entry .is_persistent = mydata -> is_persistent ;
348348#define PHAR_ZIP_FAIL (errmsg ) \
349+ efree(actual_alias); \
349350 zend_hash_destroy(&mydata->manifest); \
350351 HT_INVALIDATE(&mydata->manifest); \
351352 zend_hash_destroy(&mydata->mounted_dirs); \
@@ -651,7 +652,6 @@ int phar_parse_zipfile(php_stream *fp, char *fname, size_t fname_len, char *alia
651652 }
652653
653654 if (!entry .uncompressed_filesize ) {
654- efree (actual_alias );
655655 php_stream_filter_remove (filter , 1 );
656656 pefree (entry .filename , entry .is_persistent );
657657 PHAR_ZIP_FAIL ("unable to read in alias, truncated" );
@@ -685,7 +685,6 @@ int phar_parse_zipfile(php_stream *fp, char *fname, size_t fname_len, char *alia
685685 }
686686
687687 if (!entry .uncompressed_filesize ) {
688- efree (actual_alias );
689688 php_stream_filter_remove (filter , 1 );
690689 pefree (entry .filename , entry .is_persistent );
691690 PHAR_ZIP_FAIL ("unable to read in alias, truncated" );
@@ -709,7 +708,6 @@ int phar_parse_zipfile(php_stream *fp, char *fname, size_t fname_len, char *alia
709708 }
710709
711710 if (!entry .uncompressed_filesize ) {
712- efree (actual_alias );
713711 pefree (entry .filename , entry .is_persistent );
714712 PHAR_ZIP_FAIL ("unable to read in alias, truncated" );
715713 }
0 commit comments