Re: [PATCHv4 3/9] Introduce virDomainUSBAddressSet

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

 



[...]

> +
> +static void
> +virDomainUSBAddressHubFree(virDomainUSBAddressHubPtr hub)
> +{
> +    size_t i;
> +
> +    if (!hub)

       ^^^^^^^^
> +        return;
> +
> +    for (i = 0; i < hub->nports; i++) {
> +        if (hub->hubs[i])

Of course I realize after pressing send that the if check is duplicitous

> +            virDomainUSBAddressHubFree(hub->hubs[i]);
> +    }
> +    virBitmapFree(hub->ports);
> +    VIR_FREE(hub);
> +}
> +
> +
> +void
> +virDomainUSBAddressSetFree(virDomainUSBAddressSetPtr addrs)
> +{
> +    size_t i;
> +
> +    if (!addrs)
> +        return;
> +
> +    for (i = 0; i < addrs->nbuses; i++) {
> +        if (addrs->buses[i])

here too...

> +            virDomainUSBAddressHubFree(addrs->buses[i]);
> +    }
> +    VIR_FREE(addrs->buses);
> +    VIR_FREE(addrs);
> +}
[...]

--
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]