]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
rtsold: Fix bugs reported by Coverity
authormarkj <markj@FreeBSD.org>
Wed, 2 Dec 2020 16:46:45 +0000 (16:46 +0000)
committermarkj <markj@FreeBSD.org>
Wed, 2 Dec 2020 16:46:45 +0000 (16:46 +0000)
commit438aeb48d03ff63b0841b2ad65b708c35892cb38
tree87bc786222a86084554aa5534db17473992c2927
parent5f5e430619f1603ddd41f546af423f234ce13ae6
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