diff options
-rw-r--r-- | hw/qdev.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -150,6 +150,7 @@ int qdev_init(DeviceState *dev) rc = dc->init(dev); if (rc < 0) { + object_unparent(OBJECT(dev)); qdev_free(dev); return rc; } |