mirror of
https://github.com/libretro/RetroArch
synced 2025-03-31 01:21:03 +00:00
fix double-free in cheat manager
This commit is contained in:
parent
c455a86545
commit
deb35e01a8
@ -488,8 +488,7 @@ bool cheat_manager_realloc(unsigned new_size, unsigned default_handler)
|
||||
realloc(cheat_manager_state.cheats,
|
||||
new_size * sizeof(struct item_cheat));
|
||||
|
||||
if (val)
|
||||
cheat_manager_state.cheats = val;
|
||||
cheat_manager_state.cheats = val ? val : NULL;
|
||||
}
|
||||
|
||||
if (!cheat_manager_state.cheats)
|
||||
|
Loading…
x
Reference in New Issue
Block a user