Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dfdded7c authored by Carsten Otte's avatar Carsten Otte Committed by Avi Kivity
Browse files

KVM: Fix memory leak on guest exit



This patch fixes a memory leak, we want to free the physmem when destroying
the vm.

Signed-off-by: default avatarCarsten Otte <cotte@de.ibm.com>
Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
parent eff0114a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -194,6 +194,7 @@ struct kvm *kvm_arch_create_vm(void)
void kvm_arch_destroy_vm(struct kvm *kvm)
{
	debug_unregister(kvm->arch.dbf);
	kvm_free_physmem(kvm);
	free_page((unsigned long)(kvm->arch.sca));
	kfree(kvm);
	module_put(THIS_MODULE);