summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-07-24 07:33:37 -0400
committerLioncash <mathew1800@gmail.com>2019-08-29 19:29:43 -0400
commit96cc9a92794309d83f03a34d34a6f2f24a68ac3e (patch)
tree28510cc4d919a670dbcb1dd10a69651124cb7240 /src
parent56c6f767ae7368a2b2355e002384bf4d5f672132 (diff)
kernel/vm_manager: Correct behavior in failure case of UnmapPhysicalMemory()
If an unmapping operation fails, we shouldn't be decrementing the amount of memory mapped and returning that the operation was successful. We should actually be returning the error code in this case.
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/kernel/vm_manager.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/hle/kernel/vm_manager.cpp b/src/core/hle/kernel/vm_manager.cpp
index 6b2d78cc81..6ec4159cab 100644
--- a/src/core/hle/kernel/vm_manager.cpp
+++ b/src/core/hle/kernel/vm_manager.cpp
@@ -447,6 +447,8 @@ ResultCode VMManager::UnmapPhysicalMemory(VAddr target, u64 size) {
map_size, MemoryState::Heap, VMAPermission::None);
ASSERT_MSG(remap_res.Succeeded(), "Failed to remap a memory block.");
}
+
+ return result;
}
// Update mapped amount