Re: [PATCH 1/2] conf: free the ports array of a USB hub

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2016-08-15 at 18:14 +0200, Ján Tomko wrote:
> The array needs to be freed too, not just its members.
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1366097
> ---
>  src/conf/domain_addr.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c
> index c533edb..c9cddac 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);
>  }

ACK

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]