From: Eduardo Habkost <ehabk...@redhat.com> Now that object_property_add_alias() strdup()s target_name, we can free the property names in qdev_pass_gpios().
Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Signed-off-by: Andreas Färber <afaer...@suse.de> --- hw/core/qdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index b0f0f84..d10fa5f 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -563,6 +563,7 @@ void qdev_pass_gpios(DeviceState *dev, DeviceState *container, object_property_add_alias(OBJECT(container), propname, OBJECT(dev), propname, &error_abort); + g_free(propname); } for (i = 0; i < ngl->num_out; i++) { const char *nm = ngl->name ? ngl->name : "unnamed-gpio-out"; @@ -571,6 +572,7 @@ void qdev_pass_gpios(DeviceState *dev, DeviceState *container, object_property_add_alias(OBJECT(container), propname, OBJECT(dev), propname, &error_abort); + g_free(propname); } QLIST_REMOVE(ngl, node); QLIST_INSERT_HEAD(&container->gpios, ngl, node); -- 2.1.4