* [PATCH] Fix memory leak in register save load due to xsave support
@ 2010-08-02 3:44 Avi Kivity
0 siblings, 0 replies; only message in thread
From: Avi Kivity @ 2010-08-02 3:44 UTC (permalink / raw)
To: Marcelo Tosatti, kvm
Signed-off-by: Avi Kivity <avi@redhat.com>
---
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-08-02 3:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-02 3:44 [PATCH] Fix memory leak in register save load due to xsave support Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox