qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, jsnow@redhat.com, armbru@redhat.com,
	mreitz@redhat.com, fred.konrad@greensocs.com,
	qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH v5 2/4] qapi: fix memory leak in bdrv_image_info_specific_dump
Date: Mon, 24 Oct 2016 13:37:46 +0200	[thread overview]
Message-ID: <1477309068-1333-3-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1477309068-1333-1-git-send-email-kwolf@redhat.com>

From: Pino Toscano <ptoscano@redhat.com>

The 'obj' result of the visitor was not properly freed, like done in
other places doing a similar job.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 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);
 }
 
-- 
1.8.3.1

  parent reply	other threads:[~2016-10-24 11:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-24 11:37 [Qemu-devel] [PATCH v5 0/4] fdc: Use separate qdev device for drives Kevin Wolf
2016-10-24 11:37 ` [Qemu-devel] [PATCH v5 1/4] block: improve error handling in raw_open Kevin Wolf
2016-10-24 11:37 ` Kevin Wolf [this message]
2016-10-24 11:37 ` [Qemu-devel] [PATCH v5 3/4] throttle: Correct access to wrong BlockBackendPublic structures Kevin Wolf
2016-10-24 11:37 ` [Qemu-devel] [PATCH v5 4/4] qemu-iotests: Test I/O in a single drive from a throttling group Kevin Wolf
2016-10-24 18:44 ` [Qemu-devel] [PATCH v5 0/4] fdc: Use separate qdev device for drives John Snow
2016-10-25  9:02   ` Kevin Wolf

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=1477309068-1333-3-git-send-email-kwolf@redhat.com \
    --to=kwolf@redhat.com \
    --cc=armbru@redhat.com \
    --cc=fred.konrad@greensocs.com \
    --cc=jsnow@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --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).