diff --git a/file_ops.c b/file_ops.c index 541d7028f8..3b867ff369 100644 --- a/file_ops.c +++ b/file_ops.c @@ -240,7 +240,6 @@ static struct string_list *compressed_7zip_file_list_new( CSzArEx db; ISzAlloc allocImp; ISzAlloc allocTempImp; - uint16_t *temp = NULL; size_t temp_size = 0; struct string_list *list = NULL; @@ -277,6 +276,7 @@ static struct string_list *compressed_7zip_file_list_new( uint32_t i; struct string_list *ext_list = ext ? string_split(ext, "|"): NULL; SRes res = SZ_OK; + uint16_t *temp = NULL; for (i = 0; i < db.db.NumFiles; i++) { @@ -332,6 +332,7 @@ static struct string_list *compressed_7zip_file_list_new( } string_list_free(ext_list); + free(temp); if (res != SZ_OK) { @@ -344,7 +345,6 @@ static struct string_list *compressed_7zip_file_list_new( } SzArEx_Free(&db, &allocImp); - free(temp); File_Close(&archiveStream.file); return list;