diff mbox

[v3,019/197] bug fix spotted by paolo

Message ID 1323721273-32404-20-git-send-email-aliguori@us.ibm.com
State New
Headers show

Commit Message

Anthony Liguori Dec. 12, 2011, 8:18 p.m. UTC
---
 hw/qdev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/hw/qdev.c b/hw/qdev.c
index 1102efd..4004860 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -1228,7 +1228,7 @@  void qdev_property_add_child(DeviceState *dev, const char *name,
     qdev_property_add(dev, name, type, qdev_get_child_property,
                       NULL, NULL, child, errp);
 
-    qdev_ref(dev);
+    qdev_ref(child);
     g_assert(child->parent == NULL);
     child->parent = dev;