Fix memory leak
This commit is contained in:
parent
32017c3cae
commit
cc11244307
|
@ -3162,22 +3162,25 @@ bool config_save_overrides(int override_type)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (override_type == OVERRIDE_CORE)
|
ret = false;
|
||||||
|
|
||||||
|
switch (override_type)
|
||||||
{
|
{
|
||||||
RARCH_LOG ("[overrides] path %s\n", core_path);
|
case OVERRIDE_CORE:
|
||||||
/* Create a new config file from core_path */
|
/* Create a new config file from core_path */
|
||||||
ret = config_file_write(conf, core_path);
|
RARCH_LOG ("[overrides] path %s\n", core_path);
|
||||||
config_file_free(conf);
|
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;
|
||||||
}
|
}
|
||||||
else if(override_type == OVERRIDE_GAME)
|
|
||||||
{
|
config_file_free(conf);
|
||||||
RARCH_LOG ("[overrides] path %s\n", game_path);
|
|
||||||
/* Create a new config file from core_path */
|
|
||||||
ret = config_file_write(conf, game_path);
|
|
||||||
config_file_free(conf);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ret = false;
|
|
||||||
|
|
||||||
if (bool_settings)
|
if (bool_settings)
|
||||||
free(bool_settings);
|
free(bool_settings);
|
||||||
|
|
Loading…
Reference in New Issue