From 3381a5c3a45e7c7d1c6cf65325b7fb6f6d5ef3a6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 4 Jul 2007 07:43:26 +0000 Subject: r23701: when we create a new socket with socket_accept(), clear any flags that were set in the old one. Otherwise SOCKET_FLAG_NOCLOSE causes a major fd leak (This used to be commit 4e31eda055781a710d285c509d0c51b42e351431) --- source4/lib/socket/socket.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source4') diff --git a/source4/lib/socket/socket.c b/source4/lib/socket/socket.c index 548b11ebcc..89f8fe5a56 100644 --- a/source4/lib/socket/socket.c +++ b/source4/lib/socket/socket.c @@ -166,6 +166,7 @@ _PUBLIC_ NTSTATUS socket_accept(struct socket_context *sock, struct socket_conte if (NT_STATUS_IS_OK(status)) { talloc_set_destructor(*new_sock, socket_destructor); + (*new_sock)->flags = 0; } return status; -- cgit