aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/events
diff options
context:
space:
mode:
authorMiaohe Lin <linmiaohe@huawei.com>2022-09-01 20:23:00 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2022-09-01 19:20:58 -0400
commit3c0ba05ce9c92f94ef5b7f7f1e0102c4a3cd2a77 (patch)
treeffbb93f0555d91145fbf3c842218aba393cdf24d /arch/x86/events
parentKVM: x86: Mask off unsupported and unknown bits of IA32_ARCH_CAPABILITIES (diff)
downloadlinux-dev-3c0ba05ce9c92f94ef5b7f7f1e0102c4a3cd2a77.tar.xz
linux-dev-3c0ba05ce9c92f94ef5b7f7f1e0102c4a3cd2a77.zip
KVM: x86: fix memoryleak in kvm_arch_vcpu_create()
When allocating memory for mci_ctl2_banks fails, KVM doesn't release mce_banks leading to memoryleak. Fix this issue by calling kfree() for it when kcalloc() fails. Fixes: 281b52780b57 ("KVM: x86: Add emulation for MSR_IA32_MCx_CTL2 MSRs.") Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Message-Id: <20220901122300.22298-1-linmiaohe@huawei.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/events')
0 files changed, 0 insertions, 0 deletions