diff --git a/source3/lib/messages.c b/source3/lib/messages.c index ef8e83dd6e6..65e975ec788 100644 --- a/source3/lib/messages.c +++ b/source3/lib/messages.c @@ -393,6 +393,7 @@ struct server_id messaging_server_id(const struct messaging_context *msg_ctx) NTSTATUS messaging_reinit(struct messaging_context *msg_ctx) { int ret; + char *lck_path; TALLOC_FREE(msg_ctx->msg_dgm_ref); @@ -400,9 +401,14 @@ NTSTATUS messaging_reinit(struct messaging_context *msg_ctx) .pid = getpid(), .vnn = msg_ctx->id.vnn }; + lck_path = lock_path("msg.lock"); + if (lck_path == NULL) { + return NT_STATUS_NO_MEMORY; + } + msg_ctx->msg_dgm_ref = messaging_dgm_ref( msg_ctx, msg_ctx->event_ctx, &msg_ctx->id.unique_id, - private_path("msg.sock"), lock_path("msg.lock"), + private_path("msg.sock"), lck_path, messaging_recv_cb, msg_ctx, &ret); if (msg_ctx->msg_dgm_ref == NULL) {