]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virFirewallApply: Fix possible NULL dereference on error
authorPeter Krempa <pkrempa@redhat.com>
Fri, 5 Mar 2021 09:38:49 +0000 (10:38 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 5 Mar 2021 14:33:34 +0000 (15:33 +0100)
commit0a3d0c610a5f51632cc2c11dd91a838d7c8fff07
treecacadc9c7b23c48df3fd08606ebf52f0241a445f
parent1553e7256701c725cf87bafa5d738da16f278c3d
virFirewallApply: Fix possible NULL dereference on error

Commit bbc25f0d03d443efd35381463efc81b01cb6ae96 juggled around some
error reporting. Unfortunately virFirewallApply tries to report the
errno stored in the firewall object and we'd try to do that when the
firewall object is NULL too. Report EINVAL if 'firewall' is NULL.

Found by Coverity.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
src/util/virfirewall.c