aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/vm_manager.cpp
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
commitff201725eddfb48abe5a41e5b044087a8825f9d4 (patch)
tree28510cc4d919a670dbcb1dd10a69651124cb7240 /src/core/hle/kernel/vm_manager.cpp
parentaed2815ba60e5e7efb38ef8c04e65b21a3af8ca1 (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/core/hle/kernel/vm_manager.cpp')
-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