summaryrefslogtreecommitdiff
path: root/source3/libsmb/async_smb.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb/async_smb.c')
-rw-r--r--source3/libsmb/async_smb.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c
index e579d1c9f0..066ac7bdb8 100644
--- a/source3/libsmb/async_smb.c
+++ b/source3/libsmb/async_smb.c
@@ -861,7 +861,7 @@ static NTSTATUS validate_smb_crypto(struct cli_state *cli, char *pdu)
static void handle_incoming_pdu(struct cli_state *cli)
{
- struct cli_request *req;
+ struct cli_request *req, *next;
uint16_t mid;
size_t raw_pdu_len, buf_len, pdu_len, rest_len;
char *pdu;
@@ -978,8 +978,11 @@ static void handle_incoming_pdu(struct cli_state *cli)
DEBUG(10, ("handle_incoming_pdu: Aborting with %s\n",
nt_errstr(status)));
- for (req = cli->outstanding_requests; req; req = req->next) {
- async_req_nterror(req->async[0], status);
+ for (req = cli->outstanding_requests; req; req = next) {
+ next = req->next;
+ if (req->num_async) {
+ async_req_nterror(req->async[0], status);
+ }
}
return;
}