From 6cc51fa5f5ecd35d9f85820044efa3c343c706b8 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 17 Mar 2021 10:40:47 +0100 Subject: [PATCH] task_load_handler - small cleanups --- tasks/task_save.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tasks/task_save.c b/tasks/task_save.c index e200da3621..ee1917c4af 100644 --- a/tasks/task_save.c +++ b/tasks/task_save.c @@ -941,17 +941,17 @@ static void task_load_handler(retro_task_t *task) #endif if (!state->file) - goto error; + goto end; state->size = intfstream_get_size(state->file); if (state->size < 0) - goto error; + goto end; state->data = malloc(state->size + 1); if (!state->data) - goto error; + goto end; } #ifdef HAVE_CHEEVOS @@ -1025,13 +1025,12 @@ static void task_load_handler(retro_task_t *task) free(msg); } - task_load_handler_finished(task, state); - return; + goto end; } return; -error: +end: task_load_handler_finished(task, state); }