From: Igor Mammedov <imammedo@redhat.com>
To: Li Zhijian <lizhijian@cn.fujitsu.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/4] backends/hostmem-file: fix fb->mem_path leak
Date: Wed, 23 Dec 2015 14:32:34 +0100 [thread overview]
Message-ID: <20151223143234.5678e9e3@nial.brq.redhat.com> (raw)
In-Reply-To: <1450856601-4944-4-git-send-email-lizhijian@cn.fujitsu.com>
On Wed, 23 Dec 2015 15:43:20 +0800
Li Zhijian <lizhijian@cn.fujitsu.com> wrote:
> Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
> ---
> backends/hostmem-file.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/backends/hostmem-file.c b/backends/hostmem-file.c
> index e9b6d21..5a73fd0 100644
> --- a/backends/hostmem-file.c
> +++ b/backends/hostmem-file.c
> @@ -116,11 +116,19 @@ file_backend_instance_init(Object *o)
> set_mem_path, NULL);
> }
>
> +static void file_backend_instance_finalize(Object *o)
> +{
> + HostMemoryBackendFile *fb = MEMORY_BACKEND_FILE(o);
> +
> + g_free(fb->mem_path);
> +}
> +
> static const TypeInfo file_backend_info = {
> .name = TYPE_MEMORY_BACKEND_FILE,
> .parent = TYPE_MEMORY_BACKEND,
> .class_init = file_backend_class_init,
> .instance_init = file_backend_instance_init,
> + .instance_finalize = file_backend_instance_finalize,
> .instance_size = sizeof(HostMemoryBackendFile),
> };
>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
next prev parent reply other threads:[~2015-12-23 13:32 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
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 [this message]
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=20151223143234.5678e9e3@nial.brq.redhat.com \
--to=imammedo@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).