virNWFilterRuleDefToRuleInst: virHashNew cannot return NULL

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
Tim Wiederhake 2021-07-06 13:26:10 +02:00
parent 0c209b39c9
commit 1ae0067c77

View File

@ -208,8 +208,8 @@ virNWFilterRuleDefToRuleInst(virNWFilterDef *def,
ruleinst->chainPriority = def->chainPriority;
ruleinst->def = rule;
ruleinst->priority = rule->priority;
if (!(ruleinst->vars = virHashNew(virNWFilterVarValueHashFree)))
goto cleanup;
ruleinst->vars = virHashNew(virNWFilterVarValueHashFree);
if (virNWFilterHashTablePutAll(vars, ruleinst->vars) < 0)
goto cleanup;