1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-22 14:50:27 +03:00

qemu: Using virStringListFreeCount instead VIR_FREE to free tmpPaths.

The function qemuDomainGetHostdevPath() is using VIR_FREE to free the
paths stored in tmpPaths. Both syntax analyzer are reporting a warning
about this. Replacing the old method to function
virStringListFreeCount() fixes the warnings/errors.

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
Julio Faracco 2018-11-14 15:32:31 -02:00 committed by John Ferlan
parent 83405f92a9
commit 870282cb43

View File

@ -11132,9 +11132,7 @@ qemuDomainGetHostdevPath(virDomainDefPtr def,
}
ret = 0;
cleanup:
for (i = 0; i < tmpNpaths; i++)
VIR_FREE(tmpPaths[i]);
VIR_FREE(tmpPaths);
virStringListFreeCount(tmpPaths, tmpNpaths);
VIR_FREE(tmpPerms);
virPCIDeviceFree(pci);
virUSBDeviceFree(usb);