Date: Thu, 28 Dec 2017 05:34:24 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327276 - head/sbin/routed Message-ID: <201712280534.vBS5YOfr024793@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712280534.vBS5YOfr024793>