diff options
author | 2016-02-23 17:17:31 +0000 | |
---|---|---|
committer | 2016-02-23 17:17:31 +0000 | |
commit | ad5cedddc50a387dbf5d8530f9f82fcc2e540cde (patch) | |
tree | 7a6cf946cb20efb0dce3af6939209d68886966dd | |
parent | Plug memleak: make sure that the MSR bitmap is freed in the VCPU init (diff) | |
download | wireguard-openbsd-ad5cedddc50a387dbf5d8530f9f82fcc2e540cde.tar.xz wireguard-openbsd-ad5cedddc50a387dbf5d8530f9f82fcc2e540cde.zip |
Fix previous: Need to free vc_msr_bitmap_va, not
vc_msr_bitmap_pa.
-rw-r--r-- | sys/arch/amd64/amd64/vmm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/vmm.c b/sys/arch/amd64/amd64/vmm.c index 87e90845c93..947fc3fee1a 100644 --- a/sys/arch/amd64/amd64/vmm.c +++ b/sys/arch/amd64/amd64/vmm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmm.c,v 1.37 2016/02/23 17:15:09 stefan Exp $ */ +/* $OpenBSD: vmm.c,v 1.38 2016/02/23 17:17:31 stefan Exp $ */ /* * Copyright (c) 2014 Mike Larkin <mlarkin@openbsd.org> * @@ -2000,8 +2000,8 @@ exit: if (vcpu->vc_control_va) km_free((void *)vcpu->vc_control_va, PAGE_SIZE, &kv_page, &kp_zero); - if (vcpu->vc_msr_bitmap_pa) - km_free((void *)vcpu->vc_msr_bitmap_pa, PAGE_SIZE, + if (vcpu->vc_msr_bitmap_va) + km_free((void *)vcpu->vc_msr_bitmap_va, PAGE_SIZE, &kv_page, &kp_zero); if (vcpu->vc_vmx_msr_exit_save_va) km_free((void *)vcpu->vc_vmx_msr_exit_save_va, |