From f763c933f11eeb07d4a159fc711190434439eef4 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Thu, 21 Dec 2006 13:38:52 +0100 Subject: [PATCH] Bug#404018: Close the file descriptor when binding to a socket fails. This closes the second part of the bug reported by Max Kellermann. --- src/network.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/network.c b/src/network.c index c233de68..e9ba84bb 100644 --- a/src/network.c +++ b/src/network.c @@ -284,6 +284,7 @@ int network_create_socket (const char *node, const char *service) { if (network_bind_socket (se, ai_ptr) != 0) { + close (se->fd); free (se->addr); free (se); continue; -- 2.30.2