mirror of https://gitee.com/openkylin/libvirt.git
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:
parent
83405f92a9
commit
870282cb43
src/qemu
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue