Fix memory leak in register save load due to xsave support
PATCH 1/1 Fix memory leak in register save load due to xsave support
Signed-off-by Avi Kivity <[email protected]>
--- qemu-kvm-x86.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
qemu-kvm-x86.c +2 -0
@@ -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