From dac5b1aabdadf6f2af9cd9091369695f233b8e50 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 23 Sep 2016 02:05:12 +0200 Subject: [PATCH] Fix warning 'dereference after null' --- libretro-common/file/archive_file.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/libretro-common/file/archive_file.c b/libretro-common/file/archive_file.c index 39ed009511..6559e209e5 100644 --- a/libretro-common/file/archive_file.c +++ b/libretro-common/file/archive_file.c @@ -346,10 +346,16 @@ static int file_archive_decompress_data_to_file( } end: - handle->backend->stream_free(handle->stream); - if (handle && handle->data) - free(handle->data); + if (handle) + { + if (handle->backend) + handle->backend->stream_free(handle->stream); + + if (handle->data) + free(handle->data); + } + return ret; }