All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hailiang Zhang <zhang.zhanghailiang@huawei.com>
To: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>,
	qemu devel <qemu-devel@nongnu.org>
Cc: xuquan8@huawei.com, Jason Wang <jasowang@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] net/colo-compare: Fix memory free error
Date: Wed, 22 Feb 2017 09:47:54 +0800	[thread overview]
Message-ID: <58ACEDCA.3070404@huawei.com> (raw)
In-Reply-To: <1487645041-28919-1-git-send-email-zhangchen.fnst@cn.fujitsu.com>

On 2017/2/21 10:44, Zhang Chen wrote:
> We use g_queue_init() to init s->conn_list, so we should use g_queue_clear()
> to instead of g_queue_free().
>
> Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>

Reviewed-by: zhanghailiang <zhang.zhanghailiang@huawei.com>

> ---
>   net/colo-compare.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/colo-compare.c b/net/colo-compare.c
> index 162fd6a..cf8c4c9 100644
> --- a/net/colo-compare.c
> +++ b/net/colo-compare.c
> @@ -715,7 +715,7 @@ static void colo_compare_finalize(Object *obj)
>       qemu_chr_fe_deinit(&s->chr_sec_in);
>       qemu_chr_fe_deinit(&s->chr_out);
>
> -    g_queue_free(&s->conn_list);
> +    g_queue_clear(&s->conn_list);
>
>       if (qemu_thread_is_self(&s->thread)) {
>           /* compare connection */
>

  reply	other threads:[~2017-02-22  1:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-21  2:44 [Qemu-devel] [PATCH] net/colo-compare: Fix memory free error Zhang Chen
2017-02-22  1:47 ` Hailiang Zhang [this message]
2017-02-22  3:09   ` Jason Wang
2017-02-22  3:15     ` Jason Wang
2017-02-22  5:06       ` Zhang Chen

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=58ACEDCA.3070404@huawei.com \
    --to=zhang.zhanghailiang@huawei.com \
    --cc=jasowang@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=xuquan8@huawei.com \
    --cc=zhangchen.fnst@cn.fujitsu.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.