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

login
register
mail settings
Submitter Anthony Liguori
Date Dec. 12, 2011, 8:18 p.m.
Message ID <1323721273-32404-20-git-send-email-aliguori@us.ibm.com>
Download mbox | patch
Permalink /patch/130889/
State New
Headers show

Comments

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

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;