[PATCH 04/23] virNWFilterDoInstantiate: 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 | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/nwfilter/nwfilter_gentech_driver.c b/src/nwfilter/nwfilter_gentech_driver.c
index ecba16d55c..55c7571ea5 100644
--- a/src/nwfilter/nwfilter_gentech_driver.c
+++ b/src/nwfilter/nwfilter_gentech_driver.c
@@ -493,8 +493,7 @@ virNWFilterDoInstantiate(virNWFilterTechDriver *techdriver,
     virNWFilterVarValue *lv;
     const char *learning;
     bool reportIP = false;
-
-    GHashTable *missing_vars = virHashNew(virNWFilterVarValueHashFree);
+    g_autoptr(GHashTable) missing_vars = virHashNew(virNWFilterVarValueHashFree);

     memset(&inst, 0, sizeof(inst));

@@ -593,7 +592,6 @@ virNWFilterDoInstantiate(virNWFilterTechDriver *techdriver,

  error:
     virNWFilterInstReset(&inst);
-    virHashFree(missing_vars);

     return rc;

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