summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/blocking.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/smbd/blocking.c b/source3/smbd/blocking.c
index bc4d06404f..dd99666034 100644
--- a/source3/smbd/blocking.c
+++ b/source3/smbd/blocking.c
@@ -828,7 +828,7 @@ static void process_blocking_lock_cancel_message(struct messaging_context *ctx,
struct server_id server_id,
DATA_BLOB *data)
{
- struct smbd_server_connection *sconn = smbd_server_conn;
+ struct smbd_server_connection *sconn;
NTSTATUS err;
const char *msg = (const char *)data->data;
struct blocking_lock_record *blr;
@@ -843,6 +843,12 @@ static void process_blocking_lock_cancel_message(struct messaging_context *ctx,
smb_panic("process_blocking_lock_cancel_message: bad msg");
}
+ sconn = msg_ctx_to_sconn(ctx);
+ if (sconn == NULL) {
+ DEBUG(1, ("could not find sconn\n"));
+ return;
+ }
+
memcpy(&blr, msg, sizeof(blr));
memcpy(&err, &msg[sizeof(blr)], sizeof(NTSTATUS));