[PATCH 05/23] virNWFilterBuildAll: Automatically free temporary GHashTable

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

 



Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/nwfilter/nwfilter_gentech_driver.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/nwfilter/nwfilter_gentech_driver.c b/src/nwfilter/nwfilter_gentech_driver.c
index 55c7571ea5..ea1f4f4092 100644
--- a/src/nwfilter/nwfilter_gentech_driver.c
+++ b/src/nwfilter/nwfilter_gentech_driver.c
@@ -979,7 +979,8 @@ virNWFilterBuildAll(virNWFilterDriverState *driver,
     VIR_DEBUG("Build all filters newFilters=%d", newFilters);

     if (newFilters) {
-        data.skipInterfaces = virHashNew(NULL);
+        g_autoptr(GHashTable) skipInterfaces = virHashNew(NULL);
+        data.skipInterfaces = skipInterfaces;

         data.step = STEP_APPLY_NEW;
         if (virNWFilterBindingObjListForEach(driver->bindings,
@@ -998,8 +999,6 @@ virNWFilterBuildAll(virNWFilterDriverState *driver,
                                              virNWFilterBuildIter,
                                              &data);
         }
-
-        virHashFree(data.skipInterfaces);
     } else {
         data.step = STEP_APPLY_CURRENT;
         if (virNWFilterBindingObjListForEach(driver->bindings,
-- 
2.31.1




[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