nyx: fix use after free and a heap corruption

Fix use after free and a heap corruption on emummc config loading/freeing that could cause hangs when entering emummc window.
This commit is contained in:
CTCaer
2022-10-11 04:37:17 +03:00
parent f41d6be8d4
commit 4f2a6f16d3
3 changed files with 33 additions and 6 deletions

View File

@@ -1234,6 +1234,10 @@ lv_res_t create_win_emummc_tools(lv_obj_t *btn)
lv_label_set_static_text(label_txt2, "emuMMC is disabled and eMMC will be used for boot.\n\n");
}
if (emu_info.path)
free(emu_info.path);
if (emu_info.nintendo_path)
free(emu_info.nintendo_path);
free(txt_buf);
lv_obj_set_style(label_txt2, &hint_small_style);