tcp_listen: Plug fd leak on OpenBSD with IPv6

Leaks one file descriptor per configured IPv6 address, which should be
pretty harmless.  Broken in commit da154ff, v4.3.31.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2013-05-25 17:08:26 +02:00
parent 7ebde795e7
commit 51efb954d0

View file

@ -27,7 +27,7 @@
* tcp_listen.c: Create a socket and listen on it * tcp_listen.c: Create a socket and listen on it
* *
* Known contributors to this file: * Known contributors to this file:
* Markus Armbruster, 2005-2010 * Markus Armbruster, 2005-2013
*/ */
#include <config.h> #include <config.h>
@ -98,6 +98,7 @@ again:
* IPv4. * IPv4.
*/ */
v6only_stuck = 1; v6only_stuck = 1;
close(fd);
continue; continue;
} }
} }