]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virNWFilterRuleDefToRuleInst: Restructure code to avoid cleanup
authorPeter Krempa <pkrempa@redhat.com>
Wed, 4 Aug 2021 09:21:18 +0000 (11:21 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 6 Aug 2021 06:53:26 +0000 (08:53 +0200)
commitabd045030e1ae23fd2ceb09e393d9e8f8ee725da
tree6e7929ae91c474c179d3b66ca9fbad9e31722782
parent8d4468d00791cccd0872c9a673988d8bc7b41105
virNWFilterRuleDefToRuleInst: Restructure code to avoid cleanup

Construct the 'ruleinst->vars' hash table separately in a temporary
variable so that 'ruleinst' can be allocated on success. This allows us
to get rid of the cleanup section.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/nwfilter/nwfilter_gentech_driver.c