diff --git a/source/smb_server/reply.c b/source/smb_server/reply.c index be5120c991a..980f48bf57e 100644 --- a/source/smb_server/reply.c +++ b/source/smb_server/reply.c @@ -1355,6 +1355,11 @@ void reply_tdis(struct smbsrv_request *req) { REQ_CHECK_WCT(req, 0); + if (req->tcon == NULL) { + req_reply_error(req, NT_STATUS_INVALID_HANDLE); + return; + } + close_cnum(req->tcon); /* construct reply */