qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Alex Chen <alex.chen@huawei.com>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org,
	qemu-block@nongnu.org, zhang.zhanghailiang@huawei.com
Subject: Re: [PATCH] qemu-nbd: Fix a memleak in nbd_client_thread()
Date: Thu, 3 Dec 2020 10:26:10 -0600	[thread overview]
Message-ID: <761b7ce9-1ddf-4a92-17fc-a8148cff1bd2@redhat.com> (raw)
In-Reply-To: <5FC6F5AB.30300@huawei.com>

On 12/1/20 8:02 PM, Alex Chen wrote:
> On 2020/12/2 4:15, Eric Blake wrote:

>> While the patch looks correct, we have a lot of duplication.  Simpler
>> might be a solution with only one exit label altogether:
>>
> 
> Thanks for your review, I will modify the patch and send patch v2 according to your suggestion.
> BTW, do I need to split this patch into two patches, one to solve the memleak and the other to optimizes the redundant code?

This one seems small enough that a single patch is probably fine (that
is, document that the patch is fixing a memory loop BY consolidating
redundant code).

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



      reply	other threads:[~2020-12-03 16:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01  6:13 [PATCH] qemu-nbd: Fix a memleak in nbd_client_thread() Alex Chen
2020-12-01 20:15 ` Eric Blake
2020-12-02  2:02   ` Alex Chen
2020-12-03 16:26     ` Eric Blake [this message]

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=761b7ce9-1ddf-4a92-17fc-a8148cff1bd2@redhat.com \
    --to=eblake@redhat.com \
    --cc=alex.chen@huawei.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=zhang.zhanghailiang@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).