From 8b57482fa8bfff901c08dbfa4b722b291862c372 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 27 Sep 2010 14:43:33 +1000 Subject: s4-dsdb Fix segfault in error case in rootdse module --- source4/dsdb/samdb/ldb_modules/rootdse.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source4') 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); -- cgit