[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v3 02/14] qdev: Free property names after registering
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PULL v3 02/14] qdev: Free property names after registering gpio aliases |
Date: |
Fri, 19 Jun 2015 19:24:35 +0200 |
From: Eduardo Habkost <address@hidden>
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 <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
---
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
- [Qemu-devel] [PULL v2 00/14] QOM devices patch queue 2015-06-19, Andreas Färber, 2015/06/19
- [Qemu-devel] [PULL v3 14/14] qdev: Un-deprecate qdev_init_nofail(), Andreas Färber, 2015/06/19
- [Qemu-devel] [PULL v3 05/14] backends: Fix typename of 'policy' enum property in hostmem obj, Andreas Färber, 2015/06/19
- [Qemu-devel] [PULL v3 01/14] qom: strdup() target property name on object_property_add_alias(), Andreas Färber, 2015/06/19
- [Qemu-devel] [PULL v3 02/14] qdev: Free property names after registering gpio aliases,
Andreas Färber <=
- [Qemu-devel] [PULL v3 12/14] qom: Don't pass string table to object_get_enum() function, Andreas Färber, 2015/06/19
- [Qemu-devel] [PULL v3 07/14] vl: Create (most) objects before creating chardev backends, Andreas Färber, 2015/06/19
- [Qemu-devel] [PULL v3 08/14] qom: Add helper function for getting user objects root, Andreas Färber, 2015/06/19
- [Qemu-devel] [PULL v3 06/14] doc: Document user creatable object types in help text, Andreas Färber, 2015/06/19
- [Qemu-devel] [PULL v3 13/14] qdev: Deprecated qdev_init() is finally unused, drop, Andreas Färber, 2015/06/19
- [Qemu-devel] [PULL v3 11/14] qom: Add an object_property_add_enum() helper function, Andreas Färber, 2015/06/19
- [Qemu-devel] [PULL v3 10/14] qom: Make enum string tables const-correct, Andreas Färber, 2015/06/19
- [Qemu-devel] [PULL v3 09/14] qom: Add object_new_with_props() / object_new_withpropv() helpers, Andreas Färber, 2015/06/19
- [Qemu-devel] [PULL v3 03/14] tests: Use qtest_add_data_func() consistently, Andreas Färber, 2015/06/19
- [Qemu-devel] [PULL v3 04/14] scripts: Add support for path as argument of qom-tree, Andreas Färber, 2015/06/19