Cleanup some other small leaks to do with config_get_string

This commit is contained in:
twinaphex 2015-07-09 20:16:30 +02:00
parent c82ca15c91
commit 80899d45d2
2 changed files with 8 additions and 2 deletions

View File

@ -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);

View File

@ -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;
}