diff --git a/configuration.c b/configuration.c index 5a52a7ae00..7780dfb03d 100644 --- a/configuration.c +++ b/configuration.c @@ -3190,28 +3190,28 @@ bool config_save_overrides(int override_type) path_overrides[i].ptr); } } + + ret = false; + + switch (override_type) + { + case OVERRIDE_CORE: + /* Create a new config file from core_path */ + RARCH_LOG ("[overrides] path %s\n", core_path); + ret = config_file_write(conf, core_path); + break; + case OVERRIDE_GAME: + /* Create a new config file from core_path */ + RARCH_LOG ("[overrides] path %s\n", game_path); + ret = config_file_write(conf, game_path); + break; + default: + break; + } + + config_file_free(conf); } - ret = false; - - switch (override_type) - { - case OVERRIDE_CORE: - /* Create a new config file from core_path */ - RARCH_LOG ("[overrides] path %s\n", core_path); - ret = config_file_write(conf, core_path); - break; - case OVERRIDE_GAME: - /* Create a new config file from core_path */ - RARCH_LOG ("[overrides] path %s\n", game_path); - ret = config_file_write(conf, game_path); - break; - default: - break; - } - - config_file_free(conf); - if (bool_settings) free(bool_settings); if (bool_overrides)