From be21e3023087797b44bb7d5490d8e79807868907 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 3 Jan 2017 03:52:08 +0100 Subject: [PATCH] task_autodetect.c - cleanup --- tasks/task_autodetect.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tasks/task_autodetect.c b/tasks/task_autodetect.c index 986f15faef..3ec5dca53c 100644 --- a/tasks/task_autodetect.c +++ b/tasks/task_autodetect.c @@ -298,11 +298,7 @@ static void input_autoconfigure_connect_handler(retro_task_t *task) autoconfig_params_t *params = (autoconfig_params_t*)task->state; if (!params || string_is_empty(params->name)) - { - free(params); - task_set_finished(task, true); - return; - } + goto end; if ( !input_autoconfigure_joypad_from_conf_dir(params, task) && !input_autoconfigure_joypad_from_conf_internal(params, task)) @@ -321,8 +317,8 @@ static void input_autoconfigure_connect_handler(retro_task_t *task) task_set_title(task, strdup(msg)); } +end: free(params); - task_set_finished(task, true); }