@@ -314,6 +314,7 @@ int phar_parse_zipfile(php_stream *fp, char *fname, size_t fname_len, char *alia
314314 entry .fp_type = PHAR_FP ;
315315 entry .is_persistent = mydata -> is_persistent ;
316316#define PHAR_ZIP_FAIL (errmsg ) \
317+ efree(actual_alias); \
317318 zend_hash_destroy(&mydata->manifest); \
318319 HT_INVALIDATE(&mydata->manifest); \
319320 zend_hash_destroy(&mydata->mounted_dirs); \
@@ -619,7 +620,6 @@ int phar_parse_zipfile(php_stream *fp, char *fname, size_t fname_len, char *alia
619620 }
620621
621622 if (!entry .uncompressed_filesize ) {
622- efree (actual_alias );
623623 php_stream_filter_remove (filter , 1 );
624624 pefree (entry .filename , entry .is_persistent );
625625 PHAR_ZIP_FAIL ("unable to read in alias, truncated" );
@@ -653,7 +653,6 @@ int phar_parse_zipfile(php_stream *fp, char *fname, size_t fname_len, char *alia
653653 }
654654
655655 if (!entry .uncompressed_filesize ) {
656- efree (actual_alias );
657656 php_stream_filter_remove (filter , 1 );
658657 pefree (entry .filename , entry .is_persistent );
659658 PHAR_ZIP_FAIL ("unable to read in alias, truncated" );
@@ -677,7 +676,6 @@ int phar_parse_zipfile(php_stream *fp, char *fname, size_t fname_len, char *alia
677676 }
678677
679678 if (!entry .uncompressed_filesize ) {
680- efree (actual_alias );
681679 pefree (entry .filename , entry .is_persistent );
682680 PHAR_ZIP_FAIL ("unable to read in alias, truncated" );
683681 }
0 commit comments