mirror of https://gitee.com/openkylin/libvirt.git
conf: free the ports array of a USB hub
The array needs to be freed too, not just its members. https://bugzilla.redhat.com/show_bug.cgi?id=1366097
This commit is contained in:
parent
e96041ff1a
commit
d49f6853b3
|
@ -1360,6 +1360,7 @@ virDomainUSBAddressHubFree(virDomainUSBAddressHubPtr hub)
|
||||||
|
|
||||||
for (i = 0; i < hub->nports; i++)
|
for (i = 0; i < hub->nports; i++)
|
||||||
virDomainUSBAddressHubFree(hub->ports[i]);
|
virDomainUSBAddressHubFree(hub->ports[i]);
|
||||||
|
VIR_FREE(hub->ports);
|
||||||
virBitmapFree(hub->portmap);
|
virBitmapFree(hub->portmap);
|
||||||
VIR_FREE(hub);
|
VIR_FREE(hub);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue