]> git.ipfire.org Git - thirdparty/libvirt.git/commit
hotplug: Resolve Coverity FORWARD_NULL
authorJohn Ferlan <jferlan@redhat.com>
Tue, 30 Sep 2014 10:55:23 +0000 (06:55 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 1 Dec 2014 16:07:31 +0000 (11:07 -0500)
commit59802f23bccdcf454aae2b4482467a9810ca1096
tree2d8522cfd46b802888926c8af1a4ce1647d97eb7
parentb09ff13848057c19bfbf2f6e1f2f73ed73249d47
hotplug: Resolve Coverity FORWARD_NULL

Coverity complained that because the cfg->macFilter call checked
net->ifname != NULL before calling ebtablesRemoveForwardAllowIn, then
the virNetDevOpenvswitchRemovePort call should have the same check.

However, if I move the ebtables call prior to the check for TYPE_DIRECT
(where there is a VIR_FREE(net->ifname)), then it seems Coverity is
happy.  Since firewall info is tacked on last during setup, removing
it in the opposite order of initialization seems to be natural anyway
src/qemu/qemu_hotplug.c