summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'source4/librpc/rpc')
-rw-r--r--source4/librpc/rpc/dcerpc_smb2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source4/librpc/rpc/dcerpc_smb2.c b/source4/librpc/rpc/dcerpc_smb2.c
index 2877525644..473ca78ad1 100644
--- a/source4/librpc/rpc/dcerpc_smb2.c
+++ b/source4/librpc/rpc/dcerpc_smb2.c
@@ -390,6 +390,8 @@ static NTSTATUS smb2_session_key(struct dcecli_connection *c, DATA_BLOB *session
struct smb2_private *smb = talloc_get_type(c->transport.private_data,
struct smb2_private);
+ if (smb == NULL) return NT_STATUS_CONNECTION_DISCONNECTED;
+
if (smb->session_key.length == 0) {
return NT_STATUS_NO_USER_SESSION_KEY;
}