qemu/hw/core
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
..
bus.c qom: Use returned bool to check for failure, manual part 2020-07-10 15:18:08 +02:00
clock-vmstate.c
clock.c
cpu.c qdev: Use returned bool to check for qdev_realize() etc. failure 2020-07-10 15:01:06 +02:00
fw-path-provider.c
generic-loader.c qdev: Unrealize must not fail 2020-05-15 07:08:14 +02:00
hotplug.c
irq.c
Kconfig
loader-fit.c
loader.c
machine-hmp-cmds.c
machine-qmp-cmds.c qom: Change object_get_canonical_path_component() not to malloc 2020-07-21 16:23:43 +02:00
machine.c qom: Change object_get_canonical_path_component() not to malloc 2020-07-21 16:23:43 +02:00
Makefile.objs hw/misc/empty_slot: Move the 'hw/misc' and cover in MAINTAINERS 2020-06-09 06:59:44 +02:00
nmi.c
null-machine.c hw/core/null-machine: Do not initialize unused chardev backends 2020-07-10 18:02:16 -04:00
numa.c qapi: Smooth another visitor error checking pattern 2020-07-10 15:18:08 +02:00
or-irq.c
platform-bus.c qom: Crash more nicely on object_property_get_link() failure 2020-07-10 15:18:08 +02:00
ptimer.c
qdev-clock.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
qdev-fw.c
qdev-properties-system.c error: Eliminate error_propagate() with Coccinelle, part 1 2020-07-10 15:18:08 +02:00
qdev-properties.c qdev: Ignore Error objects where the return value suffices 2020-07-10 15:18:09 +02:00
qdev.c qdev: Move doc comments from qdev.c to qdev-core.h 2020-07-20 11:35:17 +01:00
register.c
reset.c
resettable.c
split-irq.c
stream.c hw/core: stream: Add an end-of-packet flag 2020-05-14 13:44:35 +02:00
sysbus.c sysbus: sysbus_init_child_obj() is now unused, drop 2020-06-15 22:06:04 +02:00
trace-events hw/misc/empty_slot: Move the 'hw/misc' and cover in MAINTAINERS 2020-06-09 06:59:44 +02:00
uboot_image.h
vm-change-state-handler.c
vmstate-if.c