mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
node_device_driver: use g_autofree instead of VIR_FREE()
Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
771bfe0c0d
commit
a7e258d7c9
@ -439,7 +439,7 @@ nodeDeviceListCaps(virNodeDevicePtr device,
|
|||||||
{
|
{
|
||||||
virNodeDeviceObj *obj;
|
virNodeDeviceObj *obj;
|
||||||
virNodeDeviceDef *def;
|
virNodeDeviceDef *def;
|
||||||
virNodeDevCapType *list = NULL;
|
g_autofree virNodeDevCapType *list = NULL;
|
||||||
int ncaps = 0;
|
int ncaps = 0;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
@ -472,8 +472,6 @@ nodeDeviceListCaps(virNodeDevicePtr device,
|
|||||||
for (j = 0; j < i; j++)
|
for (j = 0; j < i; j++)
|
||||||
VIR_FREE(names[j]);
|
VIR_FREE(names[j]);
|
||||||
}
|
}
|
||||||
|
|
||||||
VIR_FREE(list);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user