Skip to content

Commit

Permalink
KVM: Fix memory leak on guest exit
Browse files Browse the repository at this point in the history
This patch fixes a memory leak, we want to free the physmem when destroying
the vm.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
  • Loading branch information
Carsten Otte authored and Avi Kivity committed Jul 20, 2008
1 parent eff0114 commit dfdded7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/s390/kvm/kvm-s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit dfdded7

Please sign in to comment.