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:
Ján Tomko
2020-08-02 19:36:03 +02:00
parent 201dcc1690
commit ee247e1d3f
52 changed files with 145 additions and 145 deletions

View File

@@ -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);