mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 19:11:16 +00:00
nwfilter: clear nrules when resetting virNWFilterInst
It's possible/probable the callers to virNWFilterInstReset() make it unnecessary to set the object's nrules to 0 after freeing all its rules, but that same function is setting nfilters to 0, so let's do the same for the sake of consistency. Signed-off-by: Laine Stump <laine@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
4686116075
commit
b9f829b66f
@ -240,6 +240,7 @@ virNWFilterInstReset(virNWFilterInstPtr inst)
|
|||||||
for (i = 0; i < inst->nrules; i++)
|
for (i = 0; i < inst->nrules; i++)
|
||||||
virNWFilterRuleInstFree(inst->rules[i]);
|
virNWFilterRuleInstFree(inst->rules[i]);
|
||||||
VIR_FREE(inst->rules);
|
VIR_FREE(inst->rules);
|
||||||
|
inst->nrules = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user