From: "Michael S. Tsirkin" <mst@redhat.com>
To: linzhecheng <linzhecheng@huawei.com>
Cc: qemu-devel@nongnu.org, pbonzini@redhat.com, f4bug@amsat.org,
wangxinxin.wang@huawei.com, lidonglin@huawei.com
Subject: Re: [Qemu-devel] [PATCH v2] vhost-user: fix memory leak
Date: Tue, 13 Feb 2018 18:27:56 +0200 [thread overview]
Message-ID: <20180213182739-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20180213050837.40964-1-linzhecheng@huawei.com>
On Tue, Feb 13, 2018 at 01:08:37PM +0800, linzhecheng wrote:
> g_free() was moved from vhost_net_cleanup in commit e6bcb1b, so we should
> free net after vhost_net_cleanup
>
> Signed-off-by: linzhecheng <linzhecheng@huawei.com>
Looks like this needs a Fixes: tag and CC stable - is that right?
> diff --git a/net/vhost-user.c b/net/vhost-user.c
> index cb45512506..d024573e45 100644
> --- a/net/vhost-user.c
> +++ b/net/vhost-user.c
> @@ -109,6 +109,7 @@ static int vhost_user_start(int queues, NetClientState *ncs[], CharBackend *be)
> err:
> if (net) {
> vhost_net_cleanup(net);
> + g_free(net);
> }
> vhost_user_stop(i, ncs);
> return -1;
> --
> 2.12.2.windows.2
>
next prev parent reply other threads:[~2018-02-13 16:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-13 5:08 [Qemu-devel] [PATCH v2] vhost-user: fix memory leak linzhecheng
2018-02-13 16:27 ` Michael S. Tsirkin [this message]
2018-02-13 17:01 ` Marc-André Lureau
2018-02-13 20:37 ` Philippe Mathieu-Daudé
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=20180213182739-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=f4bug@amsat.org \
--cc=lidonglin@huawei.com \
--cc=linzhecheng@huawei.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=wangxinxin.wang@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).