mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +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;
|
||||
virNodeDeviceDef *def;
|
||||
virNodeDevCapType *list = NULL;
|
||||
g_autofree virNodeDevCapType *list = NULL;
|
||||
int ncaps = 0;
|
||||
int ret = -1;
|
||||
size_t i = 0;
|
||||
@ -472,8 +472,6 @@ nodeDeviceListCaps(virNodeDevicePtr device,
|
||||
for (j = 0; j < i; j++)
|
||||
VIR_FREE(names[j]);
|
||||
}
|
||||
|
||||
VIR_FREE(list);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user