diff --git a/sbin/routed/main.c b/sbin/routed/main.c index 45b150653041..c4f9e56065e6 100644 --- a/sbin/routed/main.c +++ b/sbin/routed/main.c @@ -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");