Merge pull request #2717 from SciresM/unmirror_memory
Restore memory perms on svcUnmapMemory/UnloadNro
This commit is contained in:
commit
79c382fafd
2 changed files with 34 additions and 7 deletions
|
@ -318,7 +318,14 @@ static ResultCode UnmapMemory(Core::System& system, VAddr dst_addr, VAddr src_ad
|
|||
return result;
|
||||
}
|
||||
|
||||
return vm_manager.UnmapRange(dst_addr, size);
|
||||
const auto unmap_res = vm_manager.UnmapRange(dst_addr, size);
|
||||
|
||||
// Reprotect the source mapping on success
|
||||
if (unmap_res.IsSuccess()) {
|
||||
ASSERT(vm_manager.ReprotectRange(src_addr, size, VMAPermission::ReadWrite).IsSuccess());
|
||||
}
|
||||
|
||||
return unmap_res;
|
||||
}
|
||||
|
||||
/// Connect to an OS service given the port name, returns the handle to the port to out
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue