summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-11-21 18:03:07 +0100
committerStefan Metzmacher <metze@samba.org>2011-11-21 18:03:07 +0100
commitb895f1fb018405a5149c1c2a55e282bc88e6f8d3 (patch)
tree68fe36904837e576064e0c1cf373b1c3c6e2af0a /source3/libsmb
parentf3c39cfbe04c906a131c60bce6cda35e7289b6ca (diff)
downloadsamba-b895f1fb018405a5149c1c2a55e282bc88e6f8d3.tar.gz
samba-b895f1fb018405a5149c1c2a55e282bc88e6f8d3.tar.bz2
samba-b895f1fb018405a5149c1c2a55e282bc88e6f8d3.zip
s3:libsmb: close fd on error in cli_connect_nb()
metze
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/cliconnect.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index a2a65b5b5c..c2fa9239ef 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -3060,6 +3060,8 @@ NTSTATUS cli_connect_nb(const char *host, const struct sockaddr_storage *dest_ss
cli = cli_state_create(NULL, fd, desthost, NULL, signing_state, flags);
if (cli == NULL) {
+ close(fd);
+ fd = -1;
goto fail;
}