From: Ján Tomko Date: Mon, 15 Aug 2016 15:21:32 +0000 (+0200) Subject: conf: free the ports array of a USB hub X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=d49f6853b36234ea0ec175dc39a5d67ba2a75123;p=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 --- diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index c533edb4ff..c9cddaca7b 100644 --- a/src/conf/domain_addr.c +++ b/src/conf/domain_addr.c @@ -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); }