diff options
author | Volker Lendecke <vl@samba.org> | 2014-03-27 10:08:55 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-03-31 22:52:14 +0200 |
commit | da8b009ff72b801b930830a31009d1edc5418aea (patch) | |
tree | 0c2d4838d243407a0d2438148ef6550c0d38cb96 /source4/lib | |
parent | 193bd7d9761ffd63487892b75e076ed2d46a9731 (diff) | |
download | samba-da8b009ff72b801b930830a31009d1edc5418aea.tar.gz |
messaging4: Add some NULL checks
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/messaging/messaging.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index b1b0003e7bd..42e59a9c3bd 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -601,6 +601,9 @@ struct imessaging_context *imessaging_init(TALLOC_CTX *mem_ctx, } msg->base_path = lpcfg_imessaging_path(msg, lp_ctx); + if (msg->base_path == NULL) { + goto fail; + } ok = directory_create_or_exist_strict(msg->base_path, geteuid(), 0700); if (!ok) { @@ -608,9 +611,21 @@ struct imessaging_context *imessaging_init(TALLOC_CTX *mem_ctx, } msg->path = imessaging_path(msg, server_id); + if (msg->path == NULL) { + goto fail; + } + msg->server_id = server_id; msg->idr = idr_init(msg); + if (msg->idr == NULL) { + goto fail; + } + msg->dispatch_tree = idr_init(msg); + if (msg->dispatch_tree == NULL) { + goto fail; + } + msg->start_time = timeval_current(); status = socket_create("unix", SOCKET_TYPE_DGRAM, &msg->sock, 0); |