Commit 92b3eead authored by Cole Robinson's avatar Cole Robinson Committed by Peter Maydell

qom: Fix crash with qom-list and link properties

Commit 9561fda8 changed the type of
'opaque' for link properties, but missed updating this call site.
Reproducer:

./x86_64-softmmu/qemu-system-x86_64 -qmp unix:./qmp.sock,server &
./scripts/qmp/qmp-shell ./qmp.sock
(QEMU) qom-list path=//machine/i440fx/pci.0/child[2]
Reported-by: default avatarMarcin Gibuła <m.gibula@beyond.pl>
Signed-off-by: default avatarCole Robinson <crobinso@redhat.com>
Message-id: 2f8f007ce2152ac3b65f0811199662799c509225.1397155389.git.crobinso@redhat.com
Acked-by: default avatarAndreas Färber <afaerber@suse.de>
Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parent edc24385
......@@ -1225,7 +1225,8 @@ Object *object_resolve_path_component(Object *parent, const gchar *part)
}
if (object_property_is_link(prop)) {
return *(Object **)prop->opaque;
LinkProperty *lprop = prop->opaque;
return *lprop->child;
} else if (object_property_is_child(prop)) {
return prop->opaque;
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment