summaryrefslogtreecommitdiff
path: root/xen-all.c
diff options
context:
space:
mode:
Diffstat (limited to 'xen-all.c')
-rw-r--r--xen-all.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/xen-all.c b/xen-all.c
index 1f040c0b6c..21246e0ffd 100644
--- a/xen-all.c
+++ b/xen-all.c
@@ -459,6 +459,7 @@ static void xen_set_memory(struct MemoryListener *listener,
static void xen_region_add(MemoryListener *listener,
MemoryRegionSection *section)
{
+ memory_region_ref(section->mr);
xen_set_memory(listener, section, true);
}
@@ -466,6 +467,7 @@ static void xen_region_del(MemoryListener *listener,
MemoryRegionSection *section)
{
xen_set_memory(listener, section, false);
+ memory_region_unref(section->mr);
}
static void xen_sync_dirty_bitmap(XenIOState *state,