From: Kevin Wolf <kwolf@redhat.com>
To: Ashijeet Acharya <ashijeetacharya@gmail.com>
Cc: mreitz@redhat.com, pbonzini@redhat.com, eblake@redhat.com,
qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2] block/nbd: Fix the regression to free leaked visitor
Date: Wed, 2 Nov 2016 11:30:49 +0100 [thread overview]
Message-ID: <20161102103049.GB6182@noname.redhat.com> (raw)
In-Reply-To: <1478080120-3277-1-git-send-email-ashijeetacharya@gmail.com>
Am 02.11.2016 um 10:48 hat Ashijeet Acharya geschrieben:
> This patch frees the leaked visitor in nbd_refresh_filename() and uses
> visit_free() to fix it. The leak was introduced by the commit 491d6c7.
>
> Signed-off-by: Ashijeet Acharya <ashijeetacharya@gmail.com>
> Reviewed-by: Eric Blake <eblake@redhat.com>
I don't think this would generally be called a regression, so I'd change
the subject to just "nbd: Fix leaker visitor".
> Changes in v2:
> - Include the regression commit id in the commit message
> ---
> block/nbd.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/block/nbd.c b/block/nbd.c
> index 8ef1438..ff9d01a 100644
> --- a/block/nbd.c
> +++ b/block/nbd.c
> @@ -545,6 +545,7 @@ static void nbd_refresh_filename(BlockDriverState *bs, QDict *options)
> qdict_put(opts, "tls-creds", qstring_from_str(s->tlscredsid));
> }
>
> + visit_free(ov);
> qdict_flatten(opts);
> bs->full_open_options = opts;
> }
I would prefer freeing the visitor immediately after visit_complete() so
that everything visitor related is in a single place.
Both of these points don't make your patch wrong, of course, but would
you mind changing them?
Kevin
next prev parent reply other threads:[~2016-11-02 10:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-02 9:48 [Qemu-devel] [PATCH v2] block/nbd: Fix the regression to free leaked visitor Ashijeet Acharya
2016-11-02 10:30 ` Kevin Wolf [this message]
2016-11-02 10:33 ` Ashijeet Acharya
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=20161102103049.GB6182@noname.redhat.com \
--to=kwolf@redhat.com \
--cc=ashijeetacharya@gmail.com \
--cc=eblake@redhat.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).