aboutsummaryrefslogtreecommitdiff
path: root/hw/xen/xen_pvdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xen/xen_pvdev.c')
-rw-r--r--hw/xen/xen_pvdev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/xen/xen_pvdev.c b/hw/xen/xen_pvdev.c
index 5212bc6d9e..aed783e844 100644
--- a/hw/xen/xen_pvdev.c
+++ b/hw/xen/xen_pvdev.c
@@ -19,6 +19,7 @@
#include "qemu/osdep.h"
#include "qemu/log.h"
+#include "hw/qdev-core.h"
#include "hw/xen/xen_backend.h"
#include "hw/xen/xen_pvdev.h"
@@ -307,7 +308,8 @@ void xen_pv_del_xendev(struct XenDevice *xendev)
}
QTAILQ_REMOVE(&xendevs, xendev, next);
- g_free(xendev);
+
+ qdev_unplug(&xendev->qdev, NULL);
}
void xen_pv_insert_xendev(struct XenDevice *xendev)