mirror of
https://github.com/yuzu-mirror/unicorn.git
synced 2026-04-21 06:13:54 +00:00
Fix huge memory leak on uc_mem_protect() (#787)
A memory region is allocated inside split_region() that was only freed in error case but not on success case, leading to huge memory leak if the region size was significant.
This commit is contained in:
parent
15b99f10d0
commit
1bef32fff6
1 changed files with 1 additions and 0 deletions
1
uc.c
1
uc.c
|
|
@ -856,6 +856,7 @@ static bool split_region(struct uc_struct *uc, MemoryRegion *mr, uint64_t addres
|
|||
goto error;
|
||||
}
|
||||
|
||||
free(backup);
|
||||
return true;
|
||||
|
||||
error:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue