summaryrefslogtreecommitdiffstats
path: root/source/nsswitch
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-02-08 00:28:25 +0000
committerJeremy Allison <jra@samba.org>2007-02-08 00:28:25 +0000
commite578095bc26bfeda3b5fba4f78941c1140ae3908 (patch)
treedd0200280c3d2a6e24d6eac836b026afaa149dae /source/nsswitch
parent542ec88b6f1249d6696bfe504662f0d060628cb3 (diff)
downloadsamba-e578095bc26bfeda3b5fba4f78941c1140ae3908.tar.gz
samba-e578095bc26bfeda3b5fba4f78941c1140ae3908.tar.xz
samba-e578095bc26bfeda3b5fba4f78941c1140ae3908.zip
r21228: Fix for fd leak on error path. Thanks to
dleonard@vintela.com for this fix ! Jeremy.
Diffstat (limited to 'source/nsswitch')
-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;