KVM: x86: Fix probable memory leak of vcpu->arch.mce_banks
commit36cb93fd6b6bf7e9163a69a8bf20207aed5fea44
authorWei Yongjun <yjwei@cn.fujitsu.com>
Fri, 22 Jan 2010 06:18:47 +0000 (22 14:18 +0800)
committerMarcelo Tosatti <mtosatti@redhat.com>
Mon, 25 Jan 2010 14:26:40 +0000 (25 12:26 -0200)
treeec12f37abfee010a968001e513ba5813d0d1b615
parent062d5e9b0d714f449b261bb522eadaaf6f00f438
KVM: x86: Fix probable memory leak of vcpu->arch.mce_banks

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().

Cc: stable@kernel.org
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/x86.c