freebsd-dev/lib/libc
Lawrence Stewart 9891578a40 Plug a memory leak and potential NULL-pointer dereference introduced in r331214.
Each TCP connection that uses the system default cc_newreno(4) congestion
control algorithm module leaks a "struct newreno" (8 bytes of memory) at
connection initialisation time. The NULL-pointer dereference is only germane
when using the ABE feature, which is disabled by default.

While at it:

- Defer the allocation of memory until it is actually needed given that ABE is
  optional and disabled by default.

- Document the ENOMEM errno in getsockopt(2)/setsockopt(2).

- Document ENOMEM and ENOBUFS in tcp(4) as being synonymous given that they are
  used interchangeably throughout the code.

- Fix a few other nits also accidentally omitted from the original patch.

Reported by:	Harsh Jain on freebsd-net@
Tested by:	tjh@
Differential Revision:	https://reviews.freebsd.org/D15358
2018-05-17 02:46:27 +00:00
..
aarch64 Remove architecture specific shmat.S files. 2018-04-05 18:17:46 +00:00
amd64 Replace MD assembly exect() with a portable version. 2018-04-12 18:23:14 +00:00
arm Remove architecture specific shmat.S files. 2018-04-05 18:17:46 +00:00
capability Replace dot-dot relative pathing with SRCTOP-relative paths where possible 2017-01-20 03:23:24 +00:00
compat-43 General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
db Remove "All rights reserved" from my files. 2018-05-10 06:41:08 +00:00
gdtoa libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
gen Remove "All rights reserved" from my files. 2018-05-10 06:41:08 +00:00
gmon General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
i386 Replace MD assembly exect() with a portable version. 2018-04-12 18:23:14 +00:00
iconv libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
include getentropy(3): Fallback to kern.arandom sysctl on older kernels 2018-03-21 23:52:37 +00:00
inet SPDX: license IDs for some ISC-related files. 2017-12-08 15:57:29 +00:00
isc SPDX: more ISC-related files. 2017-12-08 17:52:53 +00:00
locale Don't put multiple names on a single .Nm line. This fixes apropos(1) 2018-04-17 09:05:46 +00:00
md Replace dot-dot relative pathing with SRCTOP-relative paths where possible 2017-01-20 03:23:24 +00:00
mips Replace MD assembly exect() with a portable version. 2018-04-12 18:23:14 +00:00
nameser SPDX: license IDs for some ISC-related files. 2017-12-08 15:57:29 +00:00
net Remove support for the Arcnet protocol. 2018-04-13 21:18:04 +00:00
nls Use current locale (f.e. set by thread). It was global locale always 2016-08-24 16:44:27 +00:00
posix1e libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
powerpc Replace MD assembly exect() with a portable version. 2018-04-12 18:23:14 +00:00
powerpc64 Replace MD assembly exect() with a portable version. 2018-04-12 18:23:14 +00:00
powerpcspe Correct an misunderstanding of MDSRCS. 2017-03-02 17:07:28 +00:00
quad General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
regex Add missing patch from r328240 2018-01-22 02:58:33 +00:00
resolv SPDX: license IDs for some ISC-related files. 2017-12-08 15:57:29 +00:00
riscv Replace SOFTFLOAT with __riscv_float_abi_*. 2018-04-19 20:36:15 +00:00
rpc des_crypt.3: Fix typo. 2018-03-07 09:31:27 +00:00
secure Carefully update stack guard bytes inside __guard_setup(). 2018-04-24 15:59:39 +00:00
softfloat Add implementations for clog(3), clogf(3), and clog(3). 2018-05-13 09:54:34 +00:00
sparc64 Replace MD assembly exect() with a portable version. 2018-04-12 18:23:14 +00:00
stdio Don't put multiple names on a single .Nm line. This fixes apropos(1) 2018-04-17 09:05:46 +00:00
stdlib Update jemalloc to version 5.1.0. 2018-05-11 00:32:31 +00:00
stdtime libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
string Remove "All rights reserved" from my files. 2018-05-10 06:41:08 +00:00
sys Plug a memory leak and potential NULL-pointer dereference introduced in r331214. 2018-05-17 02:46:27 +00:00
tests Remove 'All rights reserved' from my files 2018-05-09 20:12:59 +00:00
uuid libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
x86/sys Fix a regression in r321608. 2017-08-13 14:42:23 +00:00
xdr General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
yp libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
libc_nossp.ldscript Add different libc ldscript: the one without libssp -- 2016-10-12 13:19:21 +00:00
libc.ldscript
Makefile Now that a special no-SSP libc is used for rtld, allow 2018-05-09 10:33:25 +00:00
Makefile.depend DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
Versions.def Create namespace for the symbols added during 12-CURRENT cycle. 2016-08-06 13:28:58 +00:00