summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2021-08-07 10:51:38 +0000
committerJule Anger <janger@samba.org>2021-09-06 19:17:11 +0000
commit189bb79ac74f79b3a3de4a3577341de63206f752 (patch)
tree39809ca8891b4918cda28129b176e182c4b4a9c2 /source3
parent19485894d4b3b7e9f806434c686e880a94c8069b (diff)
downloadsamba-189bb79ac74f79b3a3de4a3577341de63206f752.tar.gz
s3/lib/dbwrap: check if global_messaging_context() succeeded
The subsequent messaging_ctdb_connection() will fail an assert if messaging is not up and running, maybe it's a bit better to add a check if global_messaging_context() actually succeeded. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14787 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit fd19cae8d2f21977d8285efd3f29e2b480d241e9)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/dbwrap/dbwrap_open.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/lib/dbwrap/dbwrap_open.c b/source3/lib/dbwrap/dbwrap_open.c
index 1d8c40af75e..52c8a94aeff 100644
--- a/source3/lib/dbwrap/dbwrap_open.c
+++ b/source3/lib/dbwrap/dbwrap_open.c
@@ -149,6 +149,10 @@ struct db_context *db_open(TALLOC_CTX *mem_ctx,
* to be initialized.
*/
msg_ctx = global_messaging_context();
+ if (msg_ctx == NULL) {
+ DBG_ERR("Failed to initialize messaging\n");
+ return NULL;
+ }
conn = messaging_ctdb_connection();
if (conn == NULL) {