mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: memory_manager: free memslot in remove_userspace_mapping
remove_userspace_mapping tears down the KVM mapping but never returns the slot id to the allocator's free list. Call `free_memory_slot` to avoid the leak. Signed-off-by: Dylan Reid <dgreid@fb.com>
This commit is contained in:
@@ -2563,6 +2563,8 @@ impl MemoryManager {
|
||||
userspace_addr_ = userspace_addr as u64
|
||||
);
|
||||
|
||||
self.memory_slot_allocator().free_memory_slot(slot);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user