[PATCH] Fix memory leak in register save load due to xsave support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Avi Kivity <avi@xxxxxxxxxx>
---
 qemu-kvm-x86.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
index fd426b7..4c32771 100644
--- a/qemu-kvm-x86.c
+++ b/qemu-kvm-x86.c
@@ -848,6 +848,7 @@ void kvm_arch_load_regs(CPUState *env, int level)
             xcrs.xcrs[0].value = env->xcr0;
             kvm_set_xcrs(env, &xcrs);
         }
+        qemu_free(xsave);
     } else {
 #endif
         memset(&fpu, 0, sizeof fpu);
@@ -1042,6 +1043,7 @@ void kvm_arch_save_regs(CPUState *env)
             if (xcrs.xcrs[0].xcr == 0)
                 env->xcr0 = xcrs.xcrs[0].value;
         }
+        qemu_free(xsave);
     } else {
 #endif
         kvm_get_fpu(env, &fpu);
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux