mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
lib: Fix CID 1362566 Dereference null return value
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
parent
6d26d7253e
commit
6279773fed
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user