vm: lock_memory_etc(): Fix error case
In case something went wrong, call unlock_memory_etc() with the rounded base address instead of with the original address. If the original address wasn't page aligned, unlock_memory_etc() would otherwise try to unlock an additional page.
This commit is contained in:
parent
5328a58455
commit
93fb0ff056
@ -5459,8 +5459,8 @@ lock_memory_etc(team_id team, void* address, size_t numBytes, uint32 flags)
|
||||
// even if not a single page was wired, unlock_memory_etc() is called
|
||||
// to put the address space reference.
|
||||
addressSpaceLocker.Unlock();
|
||||
unlock_memory_etc(team, (void*)address, nextAddress - lockBaseAddress,
|
||||
flags);
|
||||
unlock_memory_etc(team, (void*)lockBaseAddress,
|
||||
nextAddress - lockBaseAddress, flags);
|
||||
}
|
||||
|
||||
return error;
|
||||
|
Loading…
Reference in New Issue
Block a user