qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qapi: fix memory leak in bdrv_image_info_specific_dump
@ 2016-10-18  9:18 Pino Toscano
  2016-10-18  9:44 ` Kevin Wolf
  0 siblings, 1 reply; 3+ messages in thread
From: Pino Toscano @ 2016-10-18  9:18 UTC (permalink / raw)
  To: qemu-devel, qemu-block; +Cc: armbru, kwolf, mreitz, ptoscano

The 'obj' result of the visitor was not properly freed, like done in
other places doing a similar job.
---
 block/qapi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/block/qapi.c b/block/qapi.c
index 6f947e3..50d3090 100644
--- a/block/qapi.c
+++ b/block/qapi.c
@@ -698,6 +698,7 @@ void bdrv_image_info_specific_dump(fprintf_function func_fprintf, void *f,
     assert(qobject_type(obj) == QTYPE_QDICT);
     data = qdict_get(qobject_to_qdict(obj), "data");
     dump_qobject(func_fprintf, f, 1, data);
+    qobject_decref(obj);
     visit_free(v);
 }
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] qapi: fix memory leak in bdrv_image_info_specific_dump
  2016-10-18  9:18 [Qemu-devel] [PATCH] qapi: fix memory leak in bdrv_image_info_specific_dump Pino Toscano
@ 2016-10-18  9:44 ` Kevin Wolf
  2016-10-18 10:36   ` Pino Toscano
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Wolf @ 2016-10-18  9:44 UTC (permalink / raw)
  To: Pino Toscano; +Cc: qemu-devel, qemu-block, armbru, mreitz

Am 18.10.2016 um 11:18 hat Pino Toscano geschrieben:
> The 'obj' result of the visitor was not properly freed, like done in
> other places doing a similar job.
> ---
>  block/qapi.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/block/qapi.c b/block/qapi.c
> index 6f947e3..50d3090 100644
> --- a/block/qapi.c
> +++ b/block/qapi.c
> @@ -698,6 +698,7 @@ void bdrv_image_info_specific_dump(fprintf_function func_fprintf, void *f,
>      assert(qobject_type(obj) == QTYPE_QDICT);
>      data = qdict_get(qobject_to_qdict(obj), "data");
>      dump_qobject(func_fprintf, f, 1, data);
> +    qobject_decref(obj);
>      visit_free(v);
>  }

The change looks good, but without a Signed-off-by line I can't accept
the patch: http://wiki.qemu.org/Contribute/SubmitAPatch

Kevin

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] qapi: fix memory leak in bdrv_image_info_specific_dump
  2016-10-18  9:44 ` Kevin Wolf
@ 2016-10-18 10:36   ` Pino Toscano
  0 siblings, 0 replies; 3+ messages in thread
From: Pino Toscano @ 2016-10-18 10:36 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: qemu-devel, qemu-block, armbru, mreitz

[-- Attachment #1: Type: text/plain, Size: 974 bytes --]

On Tuesday, 18 October 2016 11:44:26 CEST Kevin Wolf wrote:
> Am 18.10.2016 um 11:18 hat Pino Toscano geschrieben:
> > The 'obj' result of the visitor was not properly freed, like done in
> > other places doing a similar job.
> > ---
> >  block/qapi.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/block/qapi.c b/block/qapi.c
> > index 6f947e3..50d3090 100644
> > --- a/block/qapi.c
> > +++ b/block/qapi.c
> > @@ -698,6 +698,7 @@ void bdrv_image_info_specific_dump(fprintf_function func_fprintf, void *f,
> >      assert(qobject_type(obj) == QTYPE_QDICT);
> >      data = qdict_get(qobject_to_qdict(obj), "data");
> >      dump_qobject(func_fprintf, f, 1, data);
> > +    qobject_decref(obj);
> >      visit_free(v);
> >  }
> 
> The change looks good, but without a Signed-off-by line I can't accept
> the patch: http://wiki.qemu.org/Contribute/SubmitAPatch

D'oh, sorry -- apparently I didn't send the right version... v2 coming.

Thanks,
-- 
Pino Toscano

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-18 10:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-18  9:18 [Qemu-devel] [PATCH] qapi: fix memory leak in bdrv_image_info_specific_dump Pino Toscano
2016-10-18  9:44 ` Kevin Wolf
2016-10-18 10:36   ` Pino Toscano

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).