diff --git a/tests/nwfilterxml2firewalltest.c b/tests/nwfilterxml2firewalltest.c index 6ab62f60c9..315afddca0 100644 --- a/tests/nwfilterxml2firewalltest.c +++ b/tests/nwfilterxml2firewalltest.c @@ -350,7 +350,7 @@ static int testCompareXMLToArgvFiles(const char *xml, { g_autofree char *actualargv = NULL; g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER; - GHashTable *vars = virHashNew(virNWFilterVarValueHashFree); + g_autoptr(GHashTable) vars = virHashNew(virNWFilterVarValueHashFree); virNWFilterInst inst; int ret = -1; g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew(); @@ -381,7 +381,6 @@ static int testCompareXMLToArgvFiles(const char *xml, cleanup: virNWFilterInstReset(&inst); - virHashFree(vars); return ret; }