[PATCH 16/23] nwfilterxml2firewalltest: virNWFilterIncludeDefToRuleInst: Automatically free GHashTable

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

 



Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 tests/nwfilterxml2firewalltest.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tests/nwfilterxml2firewalltest.c b/tests/nwfilterxml2firewalltest.c
index 3e8436a98c..6ab62f60c9 100644
--- a/tests/nwfilterxml2firewalltest.c
+++ b/tests/nwfilterxml2firewalltest.c
@@ -227,7 +227,7 @@ virNWFilterIncludeDefToRuleInst(virNWFilterIncludeDef *inc,
                                 GHashTable *vars,
                                 virNWFilterInst *inst)
 {
-    GHashTable *tmpvars = NULL;
+    g_autoptr(GHashTable) tmpvars = NULL;
     int ret = -1;
     g_autofree char *xml = NULL;

@@ -248,7 +248,6 @@ virNWFilterIncludeDefToRuleInst(virNWFilterIncludeDef *inc,
  cleanup:
     if (ret < 0)
         virNWFilterInstReset(inst);
-    virHashFree(tmpvars);
     return ret;
 }

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