qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Li Zhijian <lizhijian@cn.fujitsu.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/4] net/dump: fix nfds->filename leak
Date: Thu, 24 Dec 2015 11:25:22 +0800	[thread overview]
Message-ID: <567B65A2.8040305@redhat.com> (raw)
In-Reply-To: <1450856601-4944-3-git-send-email-lizhijian@cn.fujitsu.com>



On 12/23/2015 03:43 PM, Li Zhijian wrote:
> Cc: Jason Wang <jasowang@redhat.com>
> Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
> ---
>  net/dump.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/net/dump.c b/net/dump.c
> index ce16a4b..347b5ca 100644
> --- a/net/dump.c
> +++ b/net/dump.c
> @@ -329,6 +329,13 @@ static void filter_dump_instance_init(Object *obj)
>                              file_dump_set_filename, NULL);
>  }
>  
> +static void filter_dump_instance_finalize(Object *obj)
> +{
> +    NetFilterDumpState *nfds = FILTER_DUMP(obj);
> +
> +    g_free(nfds->filename);
> +}
> +
>  static void filter_dump_class_init(ObjectClass *oc, void *data)
>  {
>      NetFilterClass *nfc = NETFILTER_CLASS(oc);
> @@ -343,6 +350,7 @@ static const TypeInfo filter_dump_info = {
>      .parent = TYPE_NETFILTER,
>      .class_init = filter_dump_class_init,
>      .instance_init = filter_dump_instance_init,
> +    .instance_finalize = filter_dump_instance_finalize,
>      .instance_size = sizeof(NetFilterDumpState),
>  };
>  

Applied to my -net.

Thanks

  reply	other threads:[~2015-12-24  3:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-23  7:43 [Qemu-devel] [PATCH 0/4] fix memory leak which allocted by the setter of object_property_add_str Li Zhijian
2015-12-23  7:43 ` [Qemu-devel] [PATCH 1/4] net/filter: fix nf->netdev_id leak Li Zhijian
2015-12-24  3:24   ` Jason Wang
2015-12-23  7:43 ` [Qemu-devel] [PATCH 2/4] net/dump: fix nfds->filename leak Li Zhijian
2015-12-24  3:25   ` Jason Wang [this message]
2015-12-23  7:43 ` [Qemu-devel] [PATCH 3/4] backends/hostmem-file: fix fb->mem_path leak Li Zhijian
2015-12-23 13:32   ` Igor Mammedov
2015-12-23  7:43 ` [Qemu-devel] [PATCH 4/4] hw/ppc/spapr: fix spapr->kvm_type leak Li Zhijian
2015-12-24  8:36   ` David Gibson

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=567B65A2.8040305@redhat.com \
    --to=jasowang@redhat.com \
    --cc=lizhijian@cn.fujitsu.com \
    --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).