s3: fix crash in winbindd
[ira/wip.git] / source3 / libsmb / async_smb.c
index 6faf96c207f6e397ce0dcc7af3fa789c2e19cc37..17040b8c9f43eaeae7038658c2ee74db23932cb1 100644 (file)
@@ -604,6 +604,10 @@ bool cli_smb_req_send(struct tevent_req *req)
        struct cli_smb_state *state = tevent_req_data(
                req, struct cli_smb_state);
 
+       if (state->cli->fd == -1) {
+               return false;
+       }
+
        return cli_smb_req_iov_send(req, state, state->iov, state->iov_count);
 }