freebsd-dev/usr.sbin
Enji Cooper a393b6c82f syslogd: fix memory leaks in main(..) and allowaddr(..)
- main(..): free memory assigned to fdsr before calling die(..).
- allowaddr(..): free memory assigned to ap before returning from the
  function early. Add a `err` goto label to reduce freeaddrinfo/free(ap)
  logic duplication.

MFC after:	1 week
X-MFC notes:	some of this is dependent on refactoring not MFCed
Reported by:	clang static analyzer, Coverity
CID:		1367750 (ap leakage in allowaddr(..))
Submitted by:	Tom Rix <trix@juniper.net>
Reviewed by:	ngie
Sponsored by:	Dell EMC Isilon, Juniper
Differential Revision:	D10004
2017-03-15 18:15:30 +00:00
..
ac
accton Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
acpi Use nitems() from sys/param.h. 2017-03-10 06:25:54 +00:00
adduser
amd Fix build after r314656 2017-03-04 20:35:34 +00:00
ancontrol usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
apm
apmd It seems <sys/types.h> is a new prerequisite for <bitstring.h> after 2016-05-24 03:15:46 +00:00
arp Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
asf
audit usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
auditd usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
auditdistd usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
auditreduce usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
authpf usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
autofs usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
bhyve bhyve: document virtio-console in the manpage 2017-02-27 15:37:38 +00:00
bhyvectl usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
bhyveload usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
binmiscctl Another attempt at resolving CID 1305629. The test of cmd == -1 2016-05-13 17:48:04 +00:00
blacklistctl DIRDEPS_BUILD: Connect new directories and update dependencies. 2016-06-03 19:25:30 +00:00
blacklistd DIRDEPS_BUILD: Connect new directories and update dependencies. 2016-06-03 19:25:30 +00:00
bluetooth usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
boot0cfg Use nitems() from sys/param.h 2017-03-11 04:00:27 +00:00
bootparamd DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
bsdconfig Remove SVR4 (System V Release 4) binary compatibility support. 2017-02-28 05:14:42 +00:00
bsdinstall Convert absolute links to relative links. 2017-03-07 05:10:38 +00:00
bsnmpd Use nitems() from sys/param.h. 2017-03-12 03:43:28 +00:00
btxld Reuse our roundup2() macro instead of reinventing the wheel. 2016-04-18 17:30:33 +00:00
camdd Use nitems() from sys/param.h. 2017-03-10 04:24:21 +00:00
cdcontrol Remove last remnants of acd(4), mcd(4), and scd(4) drivers. 2016-08-25 19:36:58 +00:00
chkgrp
chown Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
chroot Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
ckdist usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
clear_locks
config Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
cpucontrol Add support for microcode update on newer AMD CPUs (10h+) 2016-11-02 16:15:49 +00:00
crashinfo Update crashinfo to work with newer gdb from ports. 2016-07-20 18:41:47 +00:00
cron usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
crunch Teach crunchide about EM_S390 to make bootstrapping from future 2017-01-10 14:40:30 +00:00
ctladm usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
ctld Use nitems() from sys/param.h. 2017-03-11 04:01:35 +00:00
ctm usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
cxgbetool Fix some trivial manlint warnings 2017-03-06 19:33:15 +00:00
daemon DIRDEPS_BUILD: Update dependencies. 2016-11-13 00:11:30 +00:00
dconschat usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
devctl Implement 'devctl clear driver' to undo a previous 'devctl set driver'. 2016-08-29 22:48:36 +00:00
devinfo Use uintmax_t (typedef'd to rman_res_t type) for rman ranges. 2016-03-18 01:28:41 +00:00
digictl
diskinfo Quell Coverity for diskinfo(8) 2017-01-04 00:39:06 +00:00
dumpcis
editmap usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
edquota Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
eeprom usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
efidp efidp manipulates UEFI Device Paths in various ways. At the moment, it 2017-03-09 00:33:38 +00:00
efivar Finish implementing -d/--device/--device-path flag to print variable 2017-03-09 00:31:36 +00:00
etcupdate etcupdate: preserve the metadata of the destination file 2016-09-08 15:53:49 +00:00
extattr Disable extattr test on UFS1. 2016-09-21 10:58:58 +00:00
extattrctl
fdcontrol usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
fdformat usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
fdread Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
fdwrite
fifolog Use :H to manipulate .CURDIR-relative paths instead of ../ 2017-03-01 05:21:21 +00:00
flowctl
fmtree usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
freebsd-update MFportsnap r264740: Use case insensitive match when parsing host(1) output. 2016-10-12 20:24:33 +00:00
fstyp Fix harmless mismerge from r286964 2017-03-09 16:22:21 +00:00
ftp-proxy usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
fwcontrol usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
getfmac
getpmac
gpioctl usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
gssd usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
gstat Add flag -B which does the same like batch mode but without exiting after 2016-11-09 07:31:39 +00:00
hyperv usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
i2c More typos in strings. 2016-12-02 11:30:21 +00:00
ifmcstat Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
inetd Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
iostat Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
iovctl usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
ip6addrctl
ipfwpcap usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
iscsid Use nitems() from sys/param.h. 2017-03-11 04:03:13 +00:00
jail Don't assign rtjp twice. 2016-12-26 19:27:12 +00:00
jexec Define which of the username options (-u/-U) to jexec(8) is the default. 2016-04-23 22:31:58 +00:00
jls Improve IP address list representation in libxo output. 2016-12-24 23:51:27 +00:00
kbdcontrol kbdcontrol: add -P path option to add keymap search paths 2016-03-16 04:05:02 +00:00
kbdmap
keyserv keyserv(1): drop useless comparison. 2016-05-30 20:41:55 +00:00
kgmon Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
kgzip Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
kldxref kldxref: bump MAXSEGS to 3 2017-02-10 19:17:10 +00:00
lastlogin
lmcconfig Use strlcpy() instead of strncpy() when copying ifname to ensure 2016-05-15 21:45:04 +00:00
lpr lpr(1): small bounds check with reallocarray(3). 2017-03-07 19:30:22 +00:00
lptcontrol
mailstats usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
mailwrapper Convert absolute links to relative links. 2017-03-07 05:10:38 +00:00
makefs makefs: improve error messages 2017-03-15 18:14:54 +00:00
makemap usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
manctl
memcontrol
mergemaster mergemaster: fix description of -p 2017-03-07 04:13:22 +00:00
mfiutil Avoid taking the address of a packed struct member in mfiutil 2017-01-09 19:39:35 +00:00
mixer mixer(8): Style: Tag no-return usage() as __dead2 2016-05-11 17:27:27 +00:00
mld6query
mlxcontrol usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
mount_smbfs usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
mountd usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
moused Add Elantech trackpad to the list of known models 2016-09-26 22:07:45 +00:00
mpsutil mpsutil(8): let calloc(3) do the multiplying. 2017-03-13 20:49:31 +00:00
mptable
mptutil "Buses" is the preferred plural of "bus" 2017-01-15 17:54:01 +00:00
mtest mtest: Prevent access to uninitialized value. 2016-04-01 01:35:52 +00:00
nandsim usr.sbin: minor spelling fixes on comments. 2016-05-01 16:41:25 +00:00
nandtool
ndiscvt usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
ndp usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
newsyslog Fix improper use of "its". 2016-11-08 23:59:41 +00:00
nfscbd Cleanup unnecessary semicolons from utilities we all love. 2016-04-15 22:31:22 +00:00
nfsd Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
nfsdumpstate
nfsrevoke
nfsuserd
ngctl
nghook
nmtree usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
nologin Convert absolute links to relative links. 2017-03-07 05:10:38 +00:00
nscd nscd(8): let calloc(3) do the multiplying. 2017-03-13 20:34:53 +00:00
ntp Configure leap-second smearing (always). 2017-03-09 05:29:24 +00:00
nvram
ofwdump
pc-sysinstall Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
pciconf Add constants and descriptions for some new PCI class definitions 2017-03-13 07:45:15 +00:00
periodic Better document security_show_{success,info,badconfig} in /etc/periodic.conf 2016-05-21 02:14:11 +00:00
pkg usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
pmcannotate
pmccontrol Use macro MAX() from sys/param.h. 2016-04-22 05:07:59 +00:00
pmcstat Remove an unused field from struct pmcstat_image. 2016-10-15 23:46:55 +00:00
pmcstudy DIRDEPS_BUILD: Add some missing dirctories to the build. 2016-08-31 19:30:59 +00:00
pnpinfo usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
portsnap Avoid division by zero in the rare case that portsnap needs to fetch 2016-12-16 22:37:16 +00:00
powerd Directly set the NONBLOCK flags when creating the socket 2016-05-10 11:18:53 +00:00
ppp Fix build of ppp when WITHOUT_PAM is set 2016-07-04 21:18:57 +00:00
pppctl
praliases usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
praudit usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
procctl
prometheus_sysctl_exporter Add a Prometheus exporter for sysctl values. 2016-12-21 08:29:44 +00:00
pstat Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
pw Increase WARNS for pw tests 2017-03-11 00:11:20 +00:00
pwd_mkdb usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
quot prefix UFS symbols with UFS_ to reduce namespace pollution 2017-02-15 19:50:26 +00:00
quotaon Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
rarpd When clearing rtmsg, pass &rtmsg to bzero() instead of the address of 2016-05-17 04:03:45 +00:00
repquota Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
rip6query usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
rmt Change /etc/rmt symlink from absolute to relative path, 2017-03-05 04:09:18 +00:00
route6d Purge varargs.h in favor of stdarg.h. 2017-01-13 08:01:27 +00:00
rpc.lockd Use .ALLSRC instead of RPCSRC 2017-03-01 04:12:24 +00:00
rpc.statd Use .ALLSRC instead of RPCSRC 2017-03-01 04:13:31 +00:00
rpc.umntall
rpc.yppasswdd Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones 2017-03-01 04:14:41 +00:00
rpc.ypupdated Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones 2017-03-01 04:16:40 +00:00
rpc.ypxfrd Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones 2017-03-01 04:22:23 +00:00
rpcbind usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
rrenumd DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
rtadvctl usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
rtadvd Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
rtprio
rtsold Garbage collect IFT_IEEE80211 (but leave the define for possible reuse) 2017-01-28 17:08:40 +00:00
rwhod Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
sa usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
sendmail usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
service
services_mkdb Remove usage of _WITH_GETLINE from usr.sbin 2016-07-30 01:10:05 +00:00
sesutil Fix sesutil fault operation. 2016-09-30 20:35:12 +00:00
setfib Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
setfmac
setpmac
smbmsg smbmsg: use a more convenient way of accessing data read from a slave 2016-11-11 15:00:13 +00:00
snapinfo
spkrtest
spray
syslogd syslogd: fix memory leaks in main(..) and allowaddr(..) 2017-03-15 18:15:30 +00:00
sysrc Change my given name from "Garrett" to "Ngie" 2016-06-13 10:30:49 +00:00
tcpdchk Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones 2017-03-01 04:17:18 +00:00
tcpdmatch Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones 2017-03-01 04:17:18 +00:00
tcpdrop
tcpdump usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
tests Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
timed usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
traceroute Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones 2017-03-01 04:17:59 +00:00
traceroute6 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones 2017-03-01 04:17:59 +00:00
trpt Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
tzsetup Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones 2017-03-01 04:23:53 +00:00
uathload Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones 2017-03-01 03:59:18 +00:00
uefisign uefisign: Remove backwards-compatibility sys/capability.h support 2016-09-19 16:07:32 +00:00
ugidfw
uhsoctl
unbound Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones 2017-03-01 04:41:59 +00:00
usbconfig
usbdump Reuse our roundup2() macro instead of reinventing the wheel. 2016-04-18 17:30:33 +00:00
utx
vidcontrol Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
vigr
vipw Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
wake
watch
watchdogd fix a watchdogd regression introduced in r308040 2016-11-10 10:45:12 +00:00
wlandebug
wpa Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones 2017-03-02 05:04:45 +00:00
yp_mkdb Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones 2017-03-01 04:02:36 +00:00
ypbind ypbind(8): let calloc(3) do the multiplying. 2017-03-13 20:51:00 +00:00
ypldap Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones 2017-03-01 04:18:28 +00:00
yppoll
yppush Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones 2017-03-01 04:24:24 +00:00
ypserv Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones 2017-03-01 04:24:56 +00:00
ypset
zic Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones 2017-03-01 04:35:21 +00:00
zonectl Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones 2017-03-01 04:19:04 +00:00
zzz
Makefile efidp manipulates UEFI Device Paths in various ways. At the moment, it 2017-03-09 00:33:38 +00:00
Makefile.amd64 Remove the si(4) driver and sicontrol(8) for Specialix serial cards. 2016-08-19 21:14:27 +00:00
Makefile.arm
Makefile.arm64
Makefile.i386 Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
Makefile.inc
Makefile.mips
Makefile.powerpc Create a new MACHINE_ARCH for Freescale PowerPC e500v2 2016-10-22 01:57:15 +00:00
Makefile.sparc64