[PATCH 1/2] virnetdevip: Free data.devices in virNetDevIPCheckIPv6Forwarding() too

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

 



We are freeing the individual strings (which were filled by
virNetDevIPCheckIPv6ForwardingCallback()) but not the array
itself.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/util/virnetdevip.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/util/virnetdevip.c b/src/util/virnetdevip.c
index c6d6175627..866ddcc213 100644
--- a/src/util/virnetdevip.c
+++ b/src/util/virnetdevip.c
@@ -651,8 +651,7 @@ virNetDevIPCheckIPv6Forwarding(void)
 
  cleanup:
     nlmsg_free(nlmsg);
-    for (i = 0; i < data.ndevices; i++)
-        VIR_FREE(data.devices[i]);
+    virStringListFreeCount(data.devices, data.ndevices);
     return valid;
 }
 
-- 
2.16.4

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

  Powered by Linux