Просмотр исходного кода

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.
Lioncash 7 лет назад
Родитель
Сommit
96cc9a9279
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      src/core/hle/kernel/vm_manager.cpp

+ 2 - 0
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