qemu/qom
Markus Armbruster 7a309cc95b qom: Change object_get_canonical_path_component() not to malloc
object_get_canonical_path_component() returns a malloced copy of a
property name on success, null on failure.

19 of its 25 callers immediately free the returned copy.

Change object_get_canonical_path_component() to return the property
name directly.  Since modifying the name would be wrong, adjust the
return type to const char *.

Drop the free from the 19 callers become simpler, add the g_strdup()
to the other six.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20200714160202.3121879-4-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
2020-07-21 16:23:43 +02:00
..
container.c qom/container: remove .instance_size initializer from container_info 2020-06-10 12:09:59 -04:00
Makefile.objs qemu-storage-daemon: Add --object option 2020-03-06 17:21:28 +01:00
object.c qom: Change object_get_canonical_path_component() not to malloc 2020-07-21 16:23:43 +02:00
object_interfaces.c qom: Introduce object_property_try_add_child() 2020-07-10 18:02:16 -04:00
qom-hmp-cmds.c qom: Change object_get_canonical_path_component() not to malloc 2020-07-21 16:23:43 +02:00
qom-qmp-cmds.c qom: Put name parameter before value / visitor parameter 2020-07-10 15:18:08 +02:00
qom-qobject.c error: Eliminate error_propagate() manually 2020-07-10 15:18:08 +02:00
trace-events trace-events: Shorten file names in comments 2019-03-22 16:18:07 +00:00