lkml.org 
[lkml]   [2022]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] KVM: x86: Fix mce_banks memory leak on mci_ctl2_banks allocation failure
On Fri, Aug 19, 2022 at 11:23 AM Vipin Sharma <vipinsh@google.com> wrote:
>
> If mci_ctl2_banks allocation fails, kvm goes to fail_free_pio_data and
> forgets about freeing mce_banks memory causing memory leak.
>
> Individually check memory allocation status and free memory in the correct
> order.
>
> Fixes: 281b52780b57 ("KVM: x86: Add emulation for MSR_IA32_MCx_CTL2 MSRs.")
> Signed-off-by: Vipin Sharma <vipinsh@google.com>
> ---
Reviewed-by: Jim Mattson <jmattson@google.com>

\
 
 \ /
  Last update: 2022-08-19 23:56    [W:0.084 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site