qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Marc-André Lureau" <marcandre.lureau@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	qemu-block@nongnu.org, "Fam Zheng" <famz@redhat.com>,
	"Hannes Reinecke" <hare@suse.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: [Qemu-devel] [PATCH 1/4] tests: fix crumple/recursive leak
Date: Thu,  9 Aug 2018 13:44:14 +0200	[thread overview]
Message-ID: <20180809114417.28718-2-marcandre.lureau@redhat.com> (raw)
In-Reply-To: <20180809114417.28718-1-marcandre.lureau@redhat.com>

Spotted by ASAN:

=================================================================
==27907==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 4120 byte(s) in 1 object(s) allocated from:
    #0 0x7f913458ce50 in calloc (/lib64/libasan.so.5+0xeee50)
    #1 0x7f9133fd641d in g_malloc0 (/lib64/libglib-2.0.so.0+0x5241d)
    #2 0x5561c6643c95 in qdict_crumple_test_recursive /home/elmarco/src/qq/tests/check-block-qdict.c:438
    #3 0x7f9133ff7c49  (/lib64/libglib-2.0.so.0+0x73c49)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 tests/check-block-qdict.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/check-block-qdict.c b/tests/check-block-qdict.c
index 478807f839..73d3e9f574 100644
--- a/tests/check-block-qdict.c
+++ b/tests/check-block-qdict.c
@@ -491,6 +491,7 @@ static void qdict_crumple_test_recursive(void)
     empty_list_0 = qobject_to(QDict, qlist_pop(empty_list));
     g_assert(empty_list_0);
     g_assert_cmpint(qdict_size(empty_list_0), ==, 0);
+    qobject_unref(empty_list_0);
 
     qobject_unref(src);
     qobject_unref(dst);
-- 
2.18.0.547.g1d89318c48

  reply	other threads:[~2018-08-09 11:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-09 11:44 [Qemu-devel] [PATCH 0/4] Memory leak fixes Marc-André Lureau
2018-08-09 11:44 ` Marc-André Lureau [this message]
2018-08-10  6:25   ` [Qemu-devel] [PATCH 1/4] tests: fix crumple/recursive leak Markus Armbruster
2018-08-09 11:44 ` [Qemu-devel] [PATCH 2/4] tests: fix bdrv-drain leak Marc-André Lureau
2018-08-10  6:28   ` Markus Armbruster
2018-08-11 14:03     ` Max Reitz
2018-08-13  6:15       ` Markus Armbruster
2018-08-13 15:35         ` Max Reitz
2018-08-14  4:36           ` Markus Armbruster
2018-08-13 15:36   ` [Qemu-devel] [Qemu-block] " Max Reitz
2018-08-09 11:44 ` [Qemu-devel] [PATCH 3/4] monitor: fix oob command leak Marc-André Lureau
2018-08-09 14:38   ` Marc-André Lureau
2018-08-10  6:55     ` Markus Armbruster
2018-08-09 11:44 ` [Qemu-devel] [PATCH 4/4] RFC: fix megasas leak Marc-André Lureau
2018-08-14  6:26   ` Paolo Bonzini
2018-08-09 16:45 ` [Qemu-devel] [PATCH 0/4] Memory leak fixes Eric Blake

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=20180809114417.28718-2-marcandre.lureau@redhat.com \
    --to=marcandre.lureau@redhat.com \
    --cc=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=famz@redhat.com \
    --cc=hare@suse.com \
    --cc=pbonzini@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).