[PATCH] virFirewallApply: Fix possible NULL dereference on error

Pavel Hrdina phrdina at redhat.com
Fri Mar 5 09:46:56 UTC 2021


On Fri, Mar 05, 2021 at 10:42:06AM +0100, Peter Krempa wrote:
> 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 at redhat.com>
> ---
>  src/util/virfirewall.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)

Reviewed-by: Pavel Hrdina <phrdina at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20210305/f0b20813/attachment-0001.sig>


More information about the libvir-list mailing list