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
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list