vfio/pci: Use g_autofree in iommufd_cdev_get_info_iova_range()
commitf3758413b77d396dd4db68643f7068fb49ec77d9
authorZhenzhong Duan <zhenzhong.duan@intel.com>
Tue, 7 May 2024 06:42:43 +0000 (7 14:42 +0800)
committerCédric Le Goater <clg@redhat.com>
Thu, 16 May 2024 14:59:20 +0000 (16 16:59 +0200)
treecf1630fbaec0547214bc7fa0403bd4d8230b8ccc
parent81987bd58b558be71dc4d8adf163f8c787a1c3e9
vfio/pci: Use g_autofree in iommufd_cdev_get_info_iova_range()

Local pointer info is freed before return from
iommufd_cdev_get_info_iova_range().

Use 'g_autofree' to avoid the g_free() calls.

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/iommufd.c