diff options
author | Bo Yang <boyang@novell.com> | 2009-03-04 18:10:20 +0800 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-03-20 09:56:15 +0100 |
commit | 808928c24ba409a3fad50cbadf1db5a9dac9ad91 (patch) | |
tree | f25ddee0438134e0317bd3466969156eaf03d13a | |
parent | 37f130fd89d02e77bf55cbd8da731d87bb4ab1e8 (diff) | |
download | samba-808928c24ba409a3fad50cbadf1db5a9dac9ad91.tar.gz samba-808928c24ba409a3fad50cbadf1db5a9dac9ad91.tar.bz2 samba-808928c24ba409a3fad50cbadf1db5a9dac9ad91.zip |
Fix crash in async_smb.c
-rw-r--r-- | source3/libsmb/async_smb.c | 9 |
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; } |