[libvirt] [PATCH] nwfilter: Fix memory leak on daemon init and shutdown

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

 



This patch fixes a memory leak on daemon init and shutdown. The module
was initialized twice and not shut down.

Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxx>

---
 src/nwfilter/nwfilter_driver.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: libvirt-acl/src/nwfilter/nwfilter_driver.c
===================================================================
--- libvirt-acl.orig/src/nwfilter/nwfilter_driver.c
+++ libvirt-acl/src/nwfilter/nwfilter_driver.c
@@ -176,6 +176,8 @@ nwfilterDriverShutdown(void) {
     if (!driverState)
         return -1;
 
+    virNWFilterLearnShutdown();
+
     nwfilterDriverLock(driverState);
 
     /* free inactive pools */
@@ -421,6 +423,5 @@ static virStateDriver stateDriver = {
 int nwfilterRegister(void) {
     virRegisterNWFilterDriver(&nwfilterDriver);
     virRegisterStateDriver(&stateDriver);
-    virNWFilterLearnInit();
     return 0;
 }
--
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]