vfio: Use g_autofree in all call site of vfio_get_region_info()
commit0d3e89bea8ff2fb74b829d80a8e3ebe05b80614a
authorZhenzhong Duan <zhenzhong.duan@intel.com>
Wed, 22 May 2024 04:40:12 +0000 (22 12:40 +0800)
committerCédric Le Goater <clg@redhat.com>
Wed, 22 May 2024 08:04:22 +0000 (22 10:04 +0200)
tree297033440f424cf363d1c29b28daa36fe7135d5e
parent0a0bda0acd529161d5cbed6c603ab89674a9af8c
vfio: Use g_autofree in all call site of vfio_get_region_info()

There are some exceptions when pointer to vfio_region_info is reused.
In that case, the pointed memory is freed manually.

Suggested-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/vfio/helpers.c
hw/vfio/igd.c
hw/vfio/pci.c