From bafc938198fdecd295d7479fe08fb6b10f359060 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 12 May 2019 19:14:39 +0200 Subject: [PATCH] content_load - get rid of error goto label --- tasks/task_content.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tasks/task_content.c b/tasks/task_content.c index 82013d949f..579c6f9279 100644 --- a/tasks/task_content.c +++ b/tasks/task_content.c @@ -256,7 +256,6 @@ static void content_load_init_wrap( static bool content_load(content_ctx_info_t *info) { unsigned i; - bool retval = true; int rarch_argc = 0; char *rarch_argv[MAX_ARGS] = {NULL}; char *argv_copy [MAX_ARGS] = {NULL}; @@ -289,8 +288,10 @@ static bool content_load(content_ctx_info_t *info) if (!retroarch_main_init(wrap_args->argc, wrap_args->argv)) { - retval = false; - goto end; + for (i = 0; i < ARRAY_SIZE(argv_copy); i++) + free(argv_copy[i]); + free(wrap_args); + return false; } if (pending_subsystem_init) @@ -310,11 +311,10 @@ static bool content_load(content_ctx_info_t *info) frontend_driver_process_args(rarch_argc_ptr, rarch_argv_ptr); frontend_driver_content_loaded(); -end: for (i = 0; i < ARRAY_SIZE(argv_copy); i++) free(argv_copy[i]); free(wrap_args); - return retval; + return true; } /**