@@ -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); \
@@ -645,7 +646,6 @@ int phar_parse_zipfile(php_stream *fp, char *fname, size_t fname_len, char *alia
645646 }
646647
647648 if (!entry .uncompressed_filesize ) {
648- efree (actual_alias );
649649 php_stream_filter_remove (filter , 1 );
650650 zend_string_release_ex (entry .filename , entry .is_persistent );
651651 PHAR_ZIP_FAIL ("unable to read in alias, truncated" );
@@ -679,7 +679,6 @@ int phar_parse_zipfile(php_stream *fp, char *fname, size_t fname_len, char *alia
679679 }
680680
681681 if (!entry .uncompressed_filesize ) {
682- efree (actual_alias );
683682 php_stream_filter_remove (filter , 1 );
684683 zend_string_release_ex (entry .filename , entry .is_persistent );
685684 PHAR_ZIP_FAIL ("unable to read in alias, truncated" );
@@ -703,7 +702,6 @@ int phar_parse_zipfile(php_stream *fp, char *fname, size_t fname_len, char *alia
703702 }
704703
705704 if (!entry .uncompressed_filesize ) {
706- efree (actual_alias );
707705 zend_string_release_ex (entry .filename , entry .is_persistent );
708706 PHAR_ZIP_FAIL ("unable to read in alias, truncated" );
709707 }
0 commit comments