diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-01-18 17:40:50 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-01-18 17:40:50 +0000 |
commit | 3db34bf64ab4f8797565dd8750003156c32b301d (patch) | |
tree | b4b660b22b17d76c7184e3d153f5c6c2e0681925 /hw/core/qdev.c | |
parent | 12b167226f2804063cf8d72fe4fdc01764c99e96 (diff) | |
parent | 300b115ce804cb6a20acc0003cc17687545b728d (diff) |
Merge remote-tracking branch 'remotes/afaerber/tags/qom-devices-for-peter' into staging
QOM infrastructure fixes and device conversions
* Dynamic class properties
* Property iterator cleanup
* Device hot-unplug ID race fix
# gpg: Signature made Mon 18 Jan 2016 17:27:01 GMT using RSA key ID 3E7E013F
# gpg: Good signature from "Andreas Färber <afaerber@suse.de>"
# gpg: aka "Andreas Färber <afaerber@suse.com>"
* remotes/afaerber/tags/qom-devices-for-peter:
MAINTAINERS: Fix sPAPR entry heading
qdev: Free QemuOpts when the QOM path goes away
qom: Change object property iterator API contract
qom: Allow properties to be registered against classes
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/core/qdev.c')
-rw-r--r-- | hw/core/qdev.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 2c7101d91d..44bf790b01 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -1206,7 +1206,6 @@ static void device_finalize(Object *obj) NamedGPIOList *ngl, *next; DeviceState *dev = DEVICE(obj); - qemu_opts_del(dev->opts); QLIST_FOREACH_SAFE(ngl, &dev->gpios, node, next) { QLIST_REMOVE(ngl, node); @@ -1254,6 +1253,9 @@ static void device_unparent(Object *obj) qapi_event_send_device_deleted(!!dev->id, dev->id, path, &error_abort); g_free(path); } + + qemu_opts_del(dev->opts); + dev->opts = NULL; } static void device_class_init(ObjectClass *class, void *data) |