mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
nwfilter: remove unnecessary code from ebtablesGetSubChainInsts()
On failure, this function would clear out and free the list of subchains it had been called with. This is unnecessary, because the *only* caller of this function will also clear out and free the list of subchains if it gets a failure from ebtablesGetSubChainInsts(). (It also makes more logical sense for the function that is creating the entire list to be the one freeing the entire list, rather than having a function whose purpose is only to create *one item* on the list freeing the entire list). Signed-off-by: Laine Stump <laine@redhat.com> Reviewed-by: Ján Tomko <jtomko redhat com>
This commit is contained in:
parent
cab4a682de
commit
4686116075
@ -3328,12 +3328,6 @@ ebtablesGetSubChainInsts(virHashTablePtr chains,
|
|||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(filter_names);
|
VIR_FREE(filter_names);
|
||||||
if (ret < 0) {
|
|
||||||
for (i = 0; i < *ninsts; i++)
|
|
||||||
VIR_FREE(*insts[i]);
|
|
||||||
VIR_FREE(*insts);
|
|
||||||
*ninsts = 0;
|
|
||||||
}
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user