]> git.ipfire.org Git - thirdparty/qemu.git/blobdiff - memory_mapping.c
block: Fix invalidate_cache error path for parent activation
[thirdparty/qemu.git] / memory_mapping.c
index 6a39d71da269acb950297b434e3e13d7a9c0b8b8..775466f3a8187f3db84d4746c03d3b1de884e703 100644 (file)
@@ -256,7 +256,7 @@ static void guest_phys_blocks_region_add(MemoryListener *listener,
 
 #ifdef DEBUG_GUEST_PHYS_REGION_ADD
     fprintf(stderr, "%s: target_start=" TARGET_FMT_plx " target_end="
-            TARGET_FMT_plx ": %s (count: %u)\n", __FUNCTION__, target_start,
+            TARGET_FMT_plx ": %s (count: %u)\n", __func__, target_start,
             target_end, predecessor ? "joined" : "added", g->list->num);
 #endif
 }
@@ -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;
         }