[libvirt-php][PATCH 4/5] src: Free @filters array in libvirt_list_all_nwfilters

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

 



This function calls virConnectListAllNWFilters() which allocates
the return buffer which we never free.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/libvirt-nwfilter.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/libvirt-nwfilter.c b/src/libvirt-nwfilter.c
index c1d1d2a..6edaead 100644
--- a/src/libvirt-nwfilter.c
+++ b/src/libvirt-nwfilter.c
@@ -364,6 +364,7 @@ PHP_FUNCTION(libvirt_list_all_nwfilters)
                                 res_nwfilter->nwfilter, 1 TSRMLS_CC);
         VIRT_REGISTER_LIST_RESOURCE(nwfilter);
     }
+    VIR_FREE(filters);
 }
 
 /*
-- 
2.13.6

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