diff options
author | Alan Somers <asomers@FreeBSD.org> | 2017-05-03 17:21:01 +0000 |
---|---|---|
committer | Alan Somers <asomers@FreeBSD.org> | 2017-05-03 17:21:01 +0000 |
commit | 6223cc336e1a1aad80fe11dad37b012aa476fb7e (patch) | |
tree | 39755c825bf9223da0d03fd08245fc91adbf855f /sbin/ifconfig/ifclone.c | |
parent | 4dd67957a836efb6a685634bd28748a2b084e355 (diff) |
Various Coverity fixes in ifconfig(8)
* Exit early if kldload(2) fails (1011259). This is the only change that
affects ifconfig's behavior.
* Close memory and resource leaks (1305624, 1305205, 1007100)
* Mark usage() as _Noreturn (1305806, 1305750)
* Fix some dereference after null checks (1011474, 270774)
Reported by: Coverity
CID: 1305624, 1305205, 1007100, 1305806, 1305750, 1011474,
CID: 270774, 1011259
Reviewed by: cem
MFC after: 3 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D10587
Notes
Notes:
svn path=/head/; revision=317755
Diffstat (limited to 'sbin/ifconfig/ifclone.c')
-rw-r--r-- | sbin/ifconfig/ifclone.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sbin/ifconfig/ifclone.c b/sbin/ifconfig/ifclone.c index e25fa9b01232..b81e8d26af8b 100644 --- a/sbin/ifconfig/ifclone.c +++ b/sbin/ifconfig/ifclone.c @@ -87,6 +87,7 @@ list_cloners(void) putchar('\n'); free(buf); + close(s); } struct clone_defcb { |