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:
Ján Tomko 2016-08-15 17:21:32 +02:00
parent e96041ff1a
commit d49f6853b3

View File

@ -1360,6 +1360,7 @@ virDomainUSBAddressHubFree(virDomainUSBAddressHubPtr hub)
for (i = 0; i < hub->nports; i++)
virDomainUSBAddressHubFree(hub->ports[i]);
VIR_FREE(hub->ports);
virBitmapFree(hub->portmap);
VIR_FREE(hub);
}