summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-09-27 14:43:33 +1000
committerAndrew Bartlett <abartlet@samba.org>2010-09-29 04:23:07 +1000
commit8b57482fa8bfff901c08dbfa4b722b291862c372 (patch)
tree2e6c6be500e9249e517814c2aa35f5e687b229ab /source4/dsdb/samdb
parent6bab5c07519baa0be1bf86161236a0307c48e31f (diff)
downloadsamba-8b57482fa8bfff901c08dbfa4b722b291862c372.tar.gz
samba-8b57482fa8bfff901c08dbfa4b722b291862c372.tar.bz2
samba-8b57482fa8bfff901c08dbfa4b722b291862c372.zip
s4-dsdb Fix segfault in error case in rootdse module
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/rootdse.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c
index 23b8f631d3..4f0b11b0ab 100644
--- a/source4/dsdb/samdb/ldb_modules/rootdse.c
+++ b/source4/dsdb/samdb/ldb_modules/rootdse.c
@@ -1063,7 +1063,10 @@ static int rootdse_become_master(struct ldb_module *module,
msg = messaging_client_init(tmp_ctx, lpcfg_messaging_path(tmp_ctx, lp_ctx),
ldb_get_event_context(ldb));
-
+ if (!msg) {
+ ldb_asprintf_errstring(ldb, "Failed to generate client messaging context in %s", lpcfg_messaging_path(tmp_ctx, lp_ctx));
+ return LDB_ERR_OPERATIONS_ERROR;
+ }
irpc_handle = irpc_binding_handle_by_name(tmp_ctx, msg,
"dreplsrv",
&ndr_table_irpc);