freebsd-dev/usr.bin/sockstat
Mikolaj Golub 003e7e4928 Try to avoid ambiguity when sysctl returns ENOMEM additionally
checking the returned oldlen: when ENOMEM is due to the supplied
buffer being too short the return oldlen is equal to buffer size.

Without this additional check sockstat gets stuck in loop leaking the
memory if the returned ENOMEM was due the exceeded memorylocked
limit. This is easily can be observed running `limits -l 1k sockstat'.

Submitted by:	Andrey Zonov <andrey zonov org>
MFC after:	1 week
2012-02-01 18:03:21 +00:00
..
Makefile Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
sockstat.1 sockstat: Also show sockets not associated with a file descriptor. 2012-01-24 21:33:34 +00:00
sockstat.c Try to avoid ambiguity when sysctl returns ENOMEM additionally 2012-02-01 18:03:21 +00:00