summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/nsswitch/winbindd.c')
-rw-r--r--source3/nsswitch/winbindd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c
index 9a4d7e3aed..9a6f1f3c28 100644
--- a/source3/nsswitch/winbindd.c
+++ b/source3/nsswitch/winbindd.c
@@ -622,8 +622,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;