[libvirt] [PATCH 2/7] virsh: Expose virDomainInterfacesAddresses
Stefan Berger
stefanb at linux.vnet.ibm.com
Sat Jun 9 00:57:32 UTC 2012
On 06/08/2012 04:04 AM, Michal Privoznik wrote:
> ---
> tools/virsh.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
> tools/virsh.pod | 10 ++++++
> 2 files changed, 102 insertions(+), 0 deletions(-)
>
> diff --git a/tools/virsh.c b/tools/virsh.c
>
> +
> +cleanup:
> + for (i = 0; i< ifaces_count; i++) {
> + VIR_FREE(ifaces[i].name);
> + VIR_FREE(ifaces[i].hwaddr);
> + for (j = 0; j< ifaces[i].ip_addrs_count; j++)
> + VIR_FREE(ifaces[i].ip_addrs[j].addr);
> + VIR_FREE(ifaces[i].ip_addrs);
> + }
> + VIR_FREE(ifaces);
I just skimmed over the code and I saw this block a couple of times. I
think it could be worth to provide a function for this in
src/util/virdomaininterface.c.
Stefan
More information about the libvir-list
mailing list