summaryrefslogtreecommitdiffstats
path: root/source/nsswitch/winbindd.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/nsswitch/winbindd.c')
-rw-r--r--source/nsswitch/winbindd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c
index 1b3c037e3c3..1df1a1d27b8 100644
--- a/source/nsswitch/winbindd.c
+++ b/source/nsswitch/winbindd.c
@@ -610,8 +610,10 @@ static void new_connection(int listen_sock, BOOL privileged)
/* Create new connection structure */
- if ((state = TALLOC_ZERO_P(NULL, struct winbindd_cli_state)) == NULL)
+ if ((state = TALLOC_ZERO_P(NULL, struct winbindd_cli_state)) == NULL) {
+ close(sock);
return;
+ }
state->sock = sock;