summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/smb_server/smb2/tcon.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/smb_server/smb2/tcon.c b/source4/smb_server/smb2/tcon.c
index 28c505a1fd..38bf4d7ef0 100644
--- a/source4/smb_server/smb2/tcon.c
+++ b/source4/smb_server/smb2/tcon.c
@@ -53,10 +53,18 @@ struct ntvfs_handle *smb2srv_pull_handle(struct smb2srv_request *req, const uint
return NULL;
}
+ /* if it's the wildcard handle, don't waste time to search it... */
+ if (hid == UINT64_MAX && tid == UINT32_MAX) {
+ return NULL;
+ }
+
/* TODO: add comments */
tcon = req->tcon;
if (tid != req->tcon->tid) {
tcon = smbsrv_smb2_tcon_find(req->session, tid, req->request_time);
+ if (!tcon) {
+ return NULL;
+ }
}
handle = smbsrv_smb2_handle_find(tcon, hid, req->request_time);