summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc-André Lureau2017-05-04 00:38:46 +0200
committerMichael Tokarev2017-06-04 17:42:55 +0200
commit22c3aea8dbaac8616db71b6adf18dee801a24fde (patch)
tree0ecef793d99d86925327fbca864ce41b224ed742
parentide-test: check return of fwrite (diff)
downloadqemu-22c3aea8dbaac8616db71b6adf18dee801a24fde.tar.gz
qemu-22c3aea8dbaac8616db71b6adf18dee801a24fde.tar.xz
qemu-22c3aea8dbaac8616db71b6adf18dee801a24fde.zip
dump: fix memory_mapping_filter leak
Spotted by ASAN. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-rw-r--r--memory_mapping.c1
1 files changed, 1 insertions, 0 deletions
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;
}