qemu-e2k/hw/virtio
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
..
Kconfig virtio-mem: Paravirtualized memory hot(un)plug 2020-07-03 07:57:04 -04:00
Makefile.objs vhost-vdpa: introduce vhost-vdpa backend 2020-07-07 07:59:51 -04:00
trace-events virtio,acpi: features, fixes, cleanups. 2020-07-07 17:37:44 +01:00
vhost-backend.c vhost-vdpa: introduce vhost-vdpa backend 2020-07-07 07:59:51 -04:00
vhost-scsi-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
vhost-stub.c vhost-user: simplify vhost_user_init/vhost_user_cleanup 2019-03-12 21:22:31 -04:00
vhost-user-blk-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
vhost-user-fs-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
vhost-user-fs.c qdev: Unrealize must not fail 2020-05-15 07:08:14 +02:00
vhost-user-input-pci.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
vhost-user-scsi-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
vhost-user-vsock-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
vhost-user-vsock.c virtio: add vhost-user-vsock base device 2020-06-12 10:17:06 -04:00
vhost-user.c Stop vhost-user sending uninitialized mmap_offsets 2020-06-24 17:18:28 -04:00
vhost-vdpa.c vhost-vdpa: fix the compile issue without kvm 2020-07-08 06:16:48 -04:00
vhost-vsock-common.c vhost-vsock: add vhost-vsock-common abstraction 2020-06-12 10:17:06 -04:00
vhost-vsock-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
vhost-vsock.c vhost-vsock: add vhost-vsock-common abstraction 2020-06-12 10:17:06 -04:00
vhost.c vhost: implement vhost_force_iommu method 2020-07-03 07:57:04 -04:00
virtio-9p-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-balloon-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-balloon.c error: Eliminate error_propagate() with Coccinelle, part 1 2020-07-10 15:18:08 +02:00
virtio-blk-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-bus.c virtio: notify virtqueue via host notifier when available 2019-11-06 06:35:00 -05:00
virtio-crypto-pci.c qom: Put name parameter before value / visitor parameter 2020-07-10 15:18:08 +02:00
virtio-crypto.c qom: Change object_get_canonical_path_component() not to malloc 2020-07-21 16:23:43 +02:00
virtio-input-host-pci.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
virtio-input-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-iommu-pci.c qom: Put name parameter before value / visitor parameter 2020-07-10 15:18:08 +02:00
virtio-iommu.c virtio-iommu: Fix coverity issue in virtio_iommu_handle_command() 2020-07-13 14:36:08 +01:00
virtio-mem-pci.c qom: Put name parameter before value / visitor parameter 2020-07-10 15:18:08 +02:00
virtio-mem-pci.h virtio-pci: Send qapi events when the virtio-mem size changes 2020-07-03 07:57:04 -04:00
virtio-mem.c qom: Change object_get_canonical_path_component() not to malloc 2020-07-21 16:23:43 +02:00
virtio-mmio.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
virtio-net-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-pci.c virtio-pci: implement queue_enabled method 2020-07-03 07:57:04 -04:00
virtio-pci.h virtio-pci: Add Function Level Reset support 2019-09-04 06:33:10 -04:00
virtio-pmem-pci.c qom: Put name parameter before value / visitor parameter 2020-07-10 15:18:08 +02:00
virtio-pmem-pci.h virtio-pci: Proxy for virtio-pmem 2019-07-04 17:00:32 -04:00
virtio-pmem.c qom: Change object_get_canonical_path_component() not to malloc 2020-07-21 16:23:43 +02:00
virtio-rng-pci.c error: Eliminate error_propagate() with Coccinelle, part 1 2020-07-10 15:18:08 +02:00
virtio-rng.c error: Eliminate error_propagate() with Coccinelle, part 1 2020-07-10 15:18:08 +02:00
virtio-scsi-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-serial-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio.c virtio-bus: introduce queue_enabled method 2020-07-03 07:57:04 -04:00