qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Kevin Wolf <kwolf@redhat.com>
Subject: [Qemu-devel] [PULL 02/11] tests: fix bdrv-drain leak
Date: Fri, 31 Aug 2018 16:24:37 +0200	[thread overview]
Message-ID: <20180831142446.22264-3-mreitz@redhat.com> (raw)
In-Reply-To: <20180831142446.22264-1-mreitz@redhat.com>

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Spotted by ASAN:

=================================================================
==5378==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 65536 byte(s) in 1 object(s) allocated from:
    #0 0x7f788f83bc48 in malloc (/lib64/libasan.so.5+0xeec48)
    #1 0x7f788c9923c5 in g_malloc (/lib64/libglib-2.0.so.0+0x523c5)
    #2 0x5622a1fe37bc in coroutine_trampoline /home/elmarco/src/qq/util/coroutine-ucontext.c:116
    #3 0x7f788a15d75f in __correctly_grouped_prefixwc (/lib64/libc.so.6+0x4c75f)

(Broken in commit 4c8158e359d.)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20180809114417.28718-3-marcandre.lureau@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 tests/test-bdrv-drain.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/test-bdrv-drain.c b/tests/test-bdrv-drain.c
index 17bb8508ae..abc8bbe6f0 100644
--- a/tests/test-bdrv-drain.c
+++ b/tests/test-bdrv-drain.c
@@ -948,6 +948,7 @@ static void coroutine_fn test_co_delete_by_drain(void *opaque)
     }
 
     dbdd->done = true;
+    g_free(buffer);
 }
 
 /**
-- 
2.17.1

  parent reply	other threads:[~2018-08-31 14:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-31 14:24 [Qemu-devel] [PULL 00/11] Block patches Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 01/11] file-posix: Skip effectiveless OFD lock operations Max Reitz
2018-08-31 14:24 ` Max Reitz [this message]
2018-08-31 14:24 ` [Qemu-devel] [PULL 03/11] jobs: change start callback to run callback Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 04/11] jobs: canonize Error object Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 05/11] jobs: add exit shim Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 06/11] block/commit: utilize job_exit shim Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 07/11] block/mirror: " Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 08/11] jobs: " Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 09/11] block/backup: make function variables consistently named Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 10/11] jobs: remove ret argument to job_completed; privatize it Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 11/11] jobs: remove job_defer_to_main_loop Max Reitz
2018-08-31 14:27 ` [Qemu-devel] [PULL 00/11] Block patches Max Reitz

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=20180831142446.22264-3-mreitz@redhat.com \
    --to=mreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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).