1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00

Protect against a closed socket

This commit is contained in:
Volker Lendecke 2008-09-05 11:47:48 +02:00 committed by Volker Lendecke
parent e5a27773f9
commit d6cb5fdafb

View File

@ -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,