summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/util_sock.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c
index 7fcb9c4c96..2063a58310 100644
--- a/source3/lib/util_sock.c
+++ b/source3/lib/util_sock.c
@@ -853,6 +853,7 @@ int open_udp_socket(const char *host, int port)
salen = sizeof(struct sockaddr_in);
} else {
DEBUG(1, ("unknown socket family %d", ss.ss_family));
+ close(res);
return -1;
}