All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marc-André Lureau" <marcandre.lureau@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: [Qemu-devel] [PATCH v5 5/5] dump: fix memory_mapping_filter leak
Date: Thu,  4 May 2017 02:38:46 +0400	[thread overview]
Message-ID: <20170503223846.6559-6-marcandre.lureau@redhat.com> (raw)
In-Reply-To: <20170503223846.6559-1-marcandre.lureau@redhat.com>

Spotted by ASAN.

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

diff --git a/memory_mapping.c b/memory_mapping.c
index 6a39d71da2..a5d38552a6 100644
--- a/memory_mapping.c
+++ b/memory_mapping.c
@@ -337,6 +337,7 @@ void memory_mapping_filter(MemoryMappingList *list, int64_t begin,
         if (cur->phys_addr >= begin + length ||
             cur->phys_addr + cur->length <= begin) {
             QTAILQ_REMOVE(&list->head, cur, next);
+            g_free(cur);
             list->num--;
             continue;
         }
-- 
2.12.0.191.gc5d8de91d

  parent reply	other threads:[~2017-05-03 22:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-03 22:38 [Qemu-devel] [PATCH v5 0/5] Memory leak fixes Marc-André Lureau
2017-05-03 22:38 ` [Qemu-devel] [PATCH v5 1/5] test-keyval: fix leaks Marc-André Lureau
2017-05-04  1:06   ` Eric Blake
2017-05-04  8:07     ` Markus Armbruster
2017-05-04  8:15       ` Markus Armbruster
2017-05-03 22:38 ` [Qemu-devel] [PATCH v5 2/5] audio: fix capture buffer leaks Marc-André Lureau
2017-05-03 23:22   ` Philippe Mathieu-Daudé
2017-05-03 22:38 ` [Qemu-devel] [PATCH v5 3/5] audio: fix WAVState leak Marc-André Lureau
2017-05-03 23:29   ` Philippe Mathieu-Daudé
2017-05-03 22:38 ` [Qemu-devel] [PATCH v5 4/5] slirp: fix leak Marc-André Lureau
2017-05-05 23:55   ` Samuel Thibault
2017-05-26 11:00     ` Marc-André Lureau
2017-05-03 22:38 ` Marc-André Lureau [this message]
2017-05-26 11:03   ` [Qemu-devel] [PATCH v5 5/5] dump: fix memory_mapping_filter leak Marc-André Lureau
2017-06-01  7:37     ` Marc-André Lureau
2017-06-01 10:15   ` Michael Tokarev
2017-05-03 22:40 ` [Qemu-devel] [PATCH v5 0/5] Memory leak fixes Marc-André Lureau
2017-05-03 23:11 ` no-reply
2017-05-04  8:35 ` Alex Bennée
2017-05-06  8:20 ` Paolo Bonzini

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=20170503223846.6559-6-marcandre.lureau@redhat.com \
    --to=marcandre.lureau@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.