mirror of
https://github.com/libretro/RetroArch
synced 2025-02-20 06:40:18 +00:00
Cleanup some other small leaks to do with config_get_string
This commit is contained in:
parent
c82ca15c91
commit
80899d45d2
3
cheats.c
3
cheats.c
@ -152,6 +152,9 @@ cheat_manager_t *cheat_manager_load(const char *path)
|
||||
|
||||
if (config_get_bool(conf, enable_key, &tmp_bool))
|
||||
cheat->cheats[i].state = tmp_bool;
|
||||
|
||||
if (tmp)
|
||||
free(tmp);
|
||||
}
|
||||
|
||||
config_file_free(conf);
|
||||
|
@ -397,15 +397,18 @@ bool core_info_get_display_name(const char *path, char *s, size_t len)
|
||||
|
||||
if (!core_name)
|
||||
goto error;
|
||||
|
||||
if (!conf)
|
||||
return false;
|
||||
goto error;
|
||||
|
||||
strlcpy(s, core_name, len);
|
||||
|
||||
free(core_name);
|
||||
|
||||
return true;
|
||||
|
||||
error:
|
||||
if (core_name)
|
||||
free(core_name);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user