From a6028daea3a947f8d4216a6174795dda0fd30657 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 2 Dec 2015 01:40:39 +0100 Subject: [PATCH] compressed_7zip_file_list_new - fix potential memleak --- file_ops.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/file_ops.c b/file_ops.c index 7e9c8491a1..e9d5dc0b5e 100644 --- a/file_ops.c +++ b/file_ops.c @@ -120,11 +120,9 @@ static int read_7zip_file( RARCH_ERR("Could not open %s as 7z archive\n.",archive_path); return -1; } - else - { - RARCH_LOG_OUTPUT("Opened archive %s. Now trying to extract %s\n", - archive_path,relative_path); - } + + RARCH_LOG_OUTPUT("Opened archive %s. Now trying to extract %s\n", + archive_path,relative_path); FileInStream_CreateVTable(&archiveStream); LookToRead_CreateVTable(&lookStream, False); @@ -274,6 +272,8 @@ static struct string_list *compressed_7zip_file_list_new( { RARCH_ERR("Could not open %s as 7z archive.\n",path); + if (ext_list) + string_list_free(ext_list); string_list_free(list); list = NULL; goto end;