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

Re: [libvirt] [PATCH 2/7] virsh: Expose virDomainInterfacesAddresses



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


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