1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-03 13:47:25 +03:00

s3:smb2_server: avoid segfault in smbd_smb2_request_pending_queue()

Because we should not call smbd_smb2_request_error() on an
request that is still running.

If the subreq implementes a cancel function, this should
take care of triggering smbd_smb2_request_error.

metze

Signed-off-by: Michael Adam <obnox@samba.org>
This commit is contained in:
Stefan Metzmacher 2012-09-20 16:04:01 +02:00 committed by Michael Adam
parent 25437df8a6
commit 9249871f40

View File

@ -1297,9 +1297,13 @@ NTSTATUS smbd_smb2_request_pending_queue(struct smbd_smb2_request *req,
* request chain. This is not allowed.
* Cancel the outstanding request.
*/
tevent_req_cancel(req->subreq);
bool ok = tevent_req_cancel(req->subreq);
if (ok) {
return NT_STATUS_OK;
}
TALLOC_FREE(req->subreq);
return smbd_smb2_request_error(req,
NT_STATUS_INSUFFICIENT_RESOURCES);
NT_STATUS_INTERNAL_ERROR);
}
if (DEBUGLEVEL >= 10) {