@@ -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); \
@@ -652,7 +653,6 @@ int phar_parse_zipfile(php_stream *fp, char *fname, size_t fname_len, char *alia
652653 }
653654
654655 if (!entry .uncompressed_filesize ) {
655- efree (actual_alias );
656656 php_stream_filter_remove (filter , 1 );
657657 zend_string_release_ex (entry .filename , entry .is_persistent );
658658 PHAR_ZIP_FAIL ("unable to read in alias, truncated" );
@@ -686,7 +686,6 @@ int phar_parse_zipfile(php_stream *fp, char *fname, size_t fname_len, char *alia
686686 }
687687
688688 if (!entry .uncompressed_filesize ) {
689- efree (actual_alias );
690689 php_stream_filter_remove (filter , 1 );
691690 zend_string_release_ex (entry .filename , entry .is_persistent );
692691 PHAR_ZIP_FAIL ("unable to read in alias, truncated" );
@@ -710,7 +709,6 @@ int phar_parse_zipfile(php_stream *fp, char *fname, size_t fname_len, char *alia
710709 }
711710
712711 if (!entry .uncompressed_filesize ) {
713- efree (actual_alias );
714712 zend_string_release_ex (entry .filename , entry .is_persistent );
715713 PHAR_ZIP_FAIL ("unable to read in alias, truncated" );
716714 }
0 commit comments