qom: Fix crash with qom-list and link properties
Commit 9561fda8d9
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: Marcin Gibuła <m.gibula@beyond.pl>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Message-id: 2f8f007ce2152ac3b65f0811199662799c509225.1397155389.git.crobinso@redhat.com
Acked-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
edc2438512
commit
92b3eeadd9
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user