nwfilterxml2firewalltest: testCompareXMLToArgvFiles: Automatically free GHashTable

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Peter Krempa 2021-11-30 11:49:24 +01:00
parent ac5264ccd6
commit dc38b4c5bf
1 changed files with 1 additions and 2 deletions

View File

@ -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;
}