Skip to contentSkip to conversation

Fix memory leak in register save load due to xsave support

PATCH New Avi Kivity 1 participant 1 message Aug 2, 2010 KVM

lore
Share & tools
lore

Avi Kivity

author
#0 lore raw

PATCH 1/1 Fix memory leak in register save load due to xsave support

---
 qemu-kvm-x86.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
qemu-kvm-x86.c +2 -0
index fd426b7..4c32771 100644
@@ -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);
Signature · 1 line
1.7.1