task_load_handler - small cleanups

This commit is contained in:
twinaphex 2021-03-17 10:40:47 +01:00
parent 7e2113b405
commit 6cc51fa5f5

View File

@ -941,17 +941,17 @@ static void task_load_handler(retro_task_t *task)
#endif #endif
if (!state->file) if (!state->file)
goto error; goto end;
state->size = intfstream_get_size(state->file); state->size = intfstream_get_size(state->file);
if (state->size < 0) if (state->size < 0)
goto error; goto end;
state->data = malloc(state->size + 1); state->data = malloc(state->size + 1);
if (!state->data) if (!state->data)
goto error; goto end;
} }
#ifdef HAVE_CHEEVOS #ifdef HAVE_CHEEVOS
@ -1025,13 +1025,12 @@ static void task_load_handler(retro_task_t *task)
free(msg); free(msg);
} }
task_load_handler_finished(task, state); goto end;
return;
} }
return; return;
error: end:
task_load_handler_finished(task, state); task_load_handler_finished(task, state);
} }