All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Raphael Norwitz <raphael.norwitz@nutanix.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	 "mst@redhat.com" <mst@redhat.com>,
	 "qemu-trivial@nongnu.org" <qemu-trivial@nongnu.org>,
	Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [PATCH] contrib/vhost-user-blk: Clean up deallocation of VuVirtqElement
Date: Fri, 01 Jul 2022 07:40:59 +0200	[thread overview]
Message-ID: <87wncx2xw4.fsf@pond.sub.org> (raw)
In-Reply-To: <20220701043032.GA28338@raphael-debian-dev> (Raphael Norwitz's message of "Fri, 1 Jul 2022 04:30:39 +0000")

Raphael Norwitz <raphael.norwitz@nutanix.com> writes:

> On Thu, Jun 30, 2022 at 10:52:19AM +0200, Markus Armbruster wrote:
>> We allocate VuVirtqElement with g_malloc() in
>> virtqueue_alloc_element(), but free it with free() in
>> vhost-user-blk.c.  Harmless, but use g_free() anyway.
>> 
>> One of the calls is guarded by a "not null" condition.  Useless,
>> because it cannot be null (it's dereferenced right before), and even
>
> NIT: if it

Yes.

>> it it could be, free() and g_free() do the right thing.  Drop the
>> conditional.
>> 
>
> Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
>
>> Fixes: Coverity CID 1490290
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>> ---
>> Not even compile-tested, because I can't figure out how this thing is
>> supposed to be built.  Its initial commit message says "make
>> vhost-user-blk", but that doesn't work anymore.
>> 
>
> make contrib/vhost-user-blk/vhost-user-blk works for me.

Could we use a contrib/README with an explanation what "contrib" means,
and how to build and use the stuff there?

Thanks!



  reply	other threads:[~2022-07-01  5:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-30  8:52 [PATCH] contrib/vhost-user-blk: Clean up deallocation of VuVirtqElement Markus Armbruster
2022-07-01  4:30 ` Raphael Norwitz
2022-07-01  5:40   ` Markus Armbruster [this message]
2022-07-26 14:57     ` Peter Maydell
2022-07-27 17:28       ` Raphael Norwitz
2022-07-28  9:51         ` Peter Maydell
2022-08-08 14:37           ` Alex Bennée
2022-07-25 18:07 ` Markus Armbruster
2022-07-26 14:46 ` Michael S. Tsirkin
2022-08-08  5:19 ` Laurent Vivier

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=87wncx2xw4.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=raphael.norwitz@nutanix.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.