All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Michal Luczaj <mhal@rbox.co>
Cc: pbonzini@redhat.com, kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: Don't kfree(NULL) on kzalloc() failure in kvm_assign_ioeventfd_idx()
Date: Mon, 27 Mar 2023 21:25:47 -0700	[thread overview]
Message-ID: <ZCJsSySJDsMtKdEa@google.com> (raw)
In-Reply-To: <20230327175457.735903-1-mhal@rbox.co>

On Mon, Mar 27, 2023, Michal Luczaj wrote:
> On kzalloc() failure, taking the `goto fail` path leads to kfree(NULL).
> Such no-op has no use. Move it out.

Huh, the original commit had the funky code, e.g. it wasn't a case of avoiding
labels or anything.

> Signed-off-by: Michal Luczaj <mhal@rbox.co>
> ---

Reviewed-by: Sean Christopherson <seanjc@google.com>

  reply	other threads:[~2023-03-28  4:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-27 17:54 [PATCH] KVM: Don't kfree(NULL) on kzalloc() failure in kvm_assign_ioeventfd_idx() Michal Luczaj
2023-03-28  4:25 ` Sean Christopherson [this message]
2023-03-28 17:35 ` Philippe Mathieu-Daudé
2023-05-26 11:39 ` Michal Luczaj
2023-06-02  1:20 ` Sean Christopherson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZCJsSySJDsMtKdEa@google.com \
    --to=seanjc@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=mhal@rbox.co \
    --cc=pbonzini@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.