svn commit: r327276 - head/sbin/routed
Warner Losh
imp at FreeBSD.org
Thu Dec 28 05:34:28 UTC 2017
Author: imp
Date: Thu Dec 28 05:34:24 2017
New Revision: 327276
URL: https://svnweb.freebsd.org/changeset/base/327276
Log:
When bind fails, make sure we closed the socket we tried to bind the
address to.
CID: 978244
Modified:
head/sbin/routed/main.c
Modified: head/sbin/routed/main.c
==============================================================================
--- head/sbin/routed/main.c Thu Dec 28 05:34:19 2017 (r327275)
+++ head/sbin/routed/main.c Thu Dec 28 05:34:24 2017 (r327276)
@@ -667,6 +667,7 @@ get_rip_sock(naddr addr,
if (bind(s, (struct sockaddr *)&rsin, sizeof(rsin)) < 0) {
if (serious)
BADERR(errno != EADDRINUSE, "bind(rip_sock)");
+ close(s);
return -1;
}
fix_sock(s,"rip_sock");
More information about the svn-src-all
mailing list