mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Use g_strfeev instead of virStringFreeList
Both accept a NULL value gracefully and virStringFreeList does not zero the pointer afterwards, so a straight replace is safe. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
@@ -153,7 +153,7 @@ cmdNodeDeviceDestroy(vshControl *ctl, const vshCmd *cmd)
|
||||
|
||||
ret = true;
|
||||
cleanup:
|
||||
virStringListFree(arr);
|
||||
g_strfreev(arr);
|
||||
if (dev)
|
||||
virNodeDeviceFree(dev);
|
||||
return ret;
|
||||
@@ -507,7 +507,7 @@ cmdNodeListDevices(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
|
||||
}
|
||||
|
||||
cleanup:
|
||||
virStringListFree(caps);
|
||||
g_strfreev(caps);
|
||||
virshNodeDeviceListFree(list);
|
||||
return ret;
|
||||
}
|
||||
@@ -577,7 +577,7 @@ cmdNodeDeviceDumpXML(vshControl *ctl, const vshCmd *cmd)
|
||||
|
||||
ret = true;
|
||||
cleanup:
|
||||
virStringListFree(arr);
|
||||
g_strfreev(arr);
|
||||
VIR_FREE(xml);
|
||||
if (device)
|
||||
virNodeDeviceFree(device);
|
||||
|
||||
Reference in New Issue
Block a user