From: "Zhang, Chen" <chen.zhang@intel.com>
To: Lukas Straub <lukasstraub2@web.de>, qemu-devel <qemu-devel@nongnu.org>
Cc: Jason Wang <jasowang@redhat.com>, Li Zhijian <lizhijian@cn.fujitsu.com>
Subject: RE: [PATCH 1/2] net/colo-compare.c: Fix memory leak for non-tcp packet
Date: Mon, 16 Nov 2020 07:31:08 +0000 [thread overview]
Message-ID: <b6eeecfd42aa48cbbfba128866bb139c@intel.com> (raw)
In-Reply-To: <af6051bf9a72151cfc5e7ec8c72dedd30ef6b332.1605438886.git.lukasstraub2@web.de>
> -----Original Message-----
> From: Lukas Straub <lukasstraub2@web.de>
> Sent: Sunday, November 15, 2020 7:19 PM
> To: qemu-devel <qemu-devel@nongnu.org>
> Cc: Zhang, Chen <chen.zhang@intel.com>; Li Zhijian
> <lizhijian@cn.fujitsu.com>; Jason Wang <jasowang@redhat.com>
> Subject: [PATCH 1/2] net/colo-compare.c: Fix memory leak for non-tcp
> packet
>
> Additional to removing the packet from the secondary queue, we also need
> to free it.
>
> Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Looks good to me.
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Thanks
Chen
> ---
> net/colo-compare.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/colo-compare.c b/net/colo-compare.c index
> 337025b44f..eed0fbb27b 100644
> --- a/net/colo-compare.c
> +++ b/net/colo-compare.c
> @@ -690,6 +690,7 @@ static void colo_compare_packet(CompareState *s,
> Connection *conn,
>
> if (result) {
> colo_release_primary_pkt(s, pkt);
> + packet_destroy(result->data, NULL);
> g_queue_remove(&conn->secondary_list, result->data);
> } else {
> /*
> --
> 2.20.1
next prev parent reply other threads:[~2020-11-16 7:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-15 11:18 [PATCH 0/2] colo-compare: Fix memory leak for non-tcp packet Lukas Straub
2020-11-15 11:19 ` [PATCH 1/2] net/colo-compare.c: " Lukas Straub
2020-11-16 7:31 ` Zhang, Chen [this message]
2020-11-15 11:19 ` [PATCH 2/2] net/colo-compare.c: Optimize removal of secondary packet Lukas Straub
2020-11-16 7:31 ` Zhang, Chen
2020-11-16 7:32 ` [PATCH 0/2] colo-compare: Fix memory leak for non-tcp packet Zhang, Chen
2021-03-17 21:23 ` Lukas Straub
2021-03-18 1:22 ` Zhang, Chen
2021-03-18 2:41 ` Jason Wang
2021-03-18 3:26 ` 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=b6eeecfd42aa48cbbfba128866bb139c@intel.com \
--to=chen.zhang@intel.com \
--cc=jasowang@redhat.com \
--cc=lizhijian@cn.fujitsu.com \
--cc=lukasstraub2@web.de \
--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 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.