]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
KVM: x86: Fix probable memory leak of vcpu->arch.mce_banks
authorWei Yongjun <yjwei@cn.fujitsu.com>
Fri, 22 Jan 2010 06:18:47 +0000 (14:18 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 28 Jan 2010 23:02:47 +0000 (15:02 -0800)
commit8e5c20d09b0003c91a96e35f7117633eefe2545a
treea3285834e374317d1e7536e49b50df3abcae3da2
parent0118bac21740345d8b4754da24f6ce1aab4a91bf
KVM: x86: Fix probable memory leak of vcpu->arch.mce_banks

commit 36cb93fd6b6bf7e9163a69a8bf20207aed5fea44 upstream.

vcpu->arch.mce_banks is malloc in kvm_arch_vcpu_init(), but
never free in any place, this may cause memory leak. So this
patch fixed to free it in kvm_arch_vcpu_uninit().

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kvm/x86.c