summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorVolker Lendecke <vl@sernet.de>2008-09-05 11:47:48 +0200
committerVolker Lendecke <vl@samba.org>2008-09-05 12:33:48 +0200
commit60255c3b2e557a233011ea02c761faee0dd3bc7f (patch)
tree7d8f9421d1e2ee6a03dffcb54f90729eba34a4c5 /source3/libsmb
parentf912ac962a0e0a79496178227e2a6614f700dde3 (diff)
downloadsamba-60255c3b2e557a233011ea02c761faee0dd3bc7f.tar.gz
samba-60255c3b2e557a233011ea02c761faee0dd3bc7f.tar.bz2
samba-60255c3b2e557a233011ea02c761faee0dd3bc7f.zip
Protect against a closed socket
(This used to be commit d6cb5fdafbddb08d32b788674eff509cae9525c6)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/async_smb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c
index a4c58aa5c7..435c8c1cb9 100644
--- a/source3/libsmb/async_smb.c
+++ b/source3/libsmb/async_smb.c
@@ -382,6 +382,11 @@ bool cli_chain_cork(struct cli_state *cli, struct event_context *ev,
SMB_ASSERT(cli->chain_accumulator == NULL);
+ if (cli->fd == -1) {
+ DEBUG(10, ("cli->fd closed\n"));
+ return false;
+ }
+
if (cli->fd_event == NULL) {
SMB_ASSERT(cli->outstanding_requests == NULL);
cli->fd_event = event_add_fd(ev, cli, cli->fd,