aboutsummaryrefslogtreecommitdiff
path: root/qdev-monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'qdev-monitor.c')
-rw-r--r--qdev-monitor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qdev-monitor.c b/qdev-monitor.c
index 9099d3d8f1..8e8ed4c131 100644
--- a/qdev-monitor.c
+++ b/qdev-monitor.c
@@ -526,7 +526,7 @@ DeviceState *qdev_device_add(QemuOpts *opts)
qdev->id = id;
}
if (qemu_opt_foreach(opts, set_property, qdev, 1) != 0) {
- qdev_free(qdev);
+ object_unparent(OBJECT(qdev));
object_unref(OBJECT(qdev));
return NULL;
}