From a3ae0e9a90e1fc1f0855b3a824c93420f4f5ea30 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 24 Jan 2016 00:06:50 +0100 Subject: [PATCH] Cleanup --- tasks/task_decompress.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tasks/task_decompress.c b/tasks/task_decompress.c index 04bf6c5bf7..dd3b1d01aa 100644 --- a/tasks/task_decompress.c +++ b/tasks/task_decompress.c @@ -124,16 +124,16 @@ static void rarch_task_decompress_handler_finished(rarch_task_t *task, if (!task->error && task->cancelled) task->error = strdup("Task canceled"); - if (!task->error) + if (task->error) + free(dec->source_file); + else { decompress_task_data_t *data = (decompress_task_data_t*)calloc(1, sizeof(*data)); data->source_file = dec->source_file; - task->task_data = data; + task->task_data = data; } - else - free(dec->source_file); if (dec->subdir) free(dec->subdir);