]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
rtsold: Fix bugs reported by Coverity
authorMark Johnston <markj@FreeBSD.org>
Wed, 2 Dec 2020 16:46:45 +0000 (16:46 +0000)
committerMark Johnston <markj@FreeBSD.org>
Wed, 2 Dec 2020 16:46:45 +0000 (16:46 +0000)
commitecce515d54bcea54fea03f731aad646c87761d22
tree87bc786222a86084554aa5534db17473992c2927
parente997614fd283b2750cf087f4628323190a8262e1
rtsold: Fix bugs reported by Coverity

- Avoid leaking a socket if llflags_get() fails.
- Avoid leaking a file handle if rtsold_init_dumpfile() fails.
- Tighten the check in if_nametosdl() which determines whether we failed
  to find the specified interface.
- Fix errno handling in an error path in rtsock_open().

MFC after: 1 week
usr.sbin/rtsold/cap_llflags.c
usr.sbin/rtsold/dump.c
usr.sbin/rtsold/if.c
usr.sbin/rtsold/rtsock.c