summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-02-08 00:28:25 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:49 -0500
commit50b3dbef68288c5e21d10070a4ce1845574ecea7 (patch)
treea52287c011458e892bef8763943f61bff9b8ce0f /source3
parent778f3a00f0fef879c6332abb1c965fe745d138c5 (diff)
downloadsamba-50b3dbef68288c5e21d10070a4ce1845574ecea7.tar.gz
samba-50b3dbef68288c5e21d10070a4ce1845574ecea7.tar.bz2
samba-50b3dbef68288c5e21d10070a4ce1845574ecea7.zip
r21228: Fix for fd leak on error path. Thanks to
dleonard@vintela.com for this fix ! Jeremy. (This used to be commit 70b5db7d8c6aa324ad98436fe3fafe715c04c5a8)
Diffstat (limited to 'source3')
-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;