Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
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