mirror of
https://github.com/libretro/RetroArch
synced 2025-02-21 09:39:56 +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))
|
if (config_get_bool(conf, enable_key, &tmp_bool))
|
||||||
cheat->cheats[i].state = tmp_bool;
|
cheat->cheats[i].state = tmp_bool;
|
||||||
|
|
||||||
|
if (tmp)
|
||||||
|
free(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
config_file_free(conf);
|
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)
|
if (!core_name)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (!conf)
|
if (!conf)
|
||||||
return false;
|
goto error;
|
||||||
|
|
||||||
strlcpy(s, core_name, len);
|
strlcpy(s, core_name, len);
|
||||||
|
|
||||||
|
free(core_name);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
if (core_name)
|
||||||
|
free(core_name);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user