mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 18:32:44 +00:00
Fix double frees and resource leaks
This commit is contained in:
parent
2e42778f1e
commit
ffdad57318
@ -714,11 +714,11 @@ bool core_info_get_display_name(const char *path, char *s, size_t len)
|
||||
config_get_string(conf, "display_name",
|
||||
&display_name);
|
||||
|
||||
config_file_free(conf);
|
||||
|
||||
if (!core_name || !display_name)
|
||||
goto error;
|
||||
|
||||
config_file_free(conf);
|
||||
|
||||
snprintf(s, len,"%s",display_name);
|
||||
|
||||
free(core_name);
|
||||
|
@ -557,7 +557,6 @@ int libretrodb_create_index(libretrodb_t *db,
|
||||
nictx.db = db;
|
||||
nictx.idx = &idx;
|
||||
bintree_iterate(tree, node_iter, &nictx);
|
||||
bintree_free(tree);
|
||||
|
||||
clean:
|
||||
rmsgpack_dom_value_free(&item);
|
||||
|
@ -180,7 +180,10 @@ static int detect_ps1_game_sub(const char *track_path,
|
||||
while (tmp < (buffer + 2048 * 2))
|
||||
{
|
||||
if (!*tmp)
|
||||
{
|
||||
filestream_close(fp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!strncasecmp((const char*)(tmp + 33), "SYSTEM.CNF;1", 12))
|
||||
break;
|
||||
|
@ -195,11 +195,12 @@ bool content_load_state(const char *path)
|
||||
for (i = 0; i < num_blocks; i++)
|
||||
free(blocks[i].data);
|
||||
free(blocks);
|
||||
free(buf);
|
||||
|
||||
if (!ret)
|
||||
goto error;
|
||||
|
||||
free(buf);
|
||||
|
||||
return true;
|
||||
|
||||
error:
|
||||
|
Loading…
x
Reference in New Issue
Block a user