From f72e28e24c2b13a957a8bbd3910d3b5294766923 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 13 Jun 2008 12:00:24 +0200 Subject: Exit smbstatus cleanly if messaging_init fails (This used to be commit 5fd51833a31b326d83ac2f76d06560920547f657) --- source3/utils/status.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source3/utils/status.c b/source3/utils/status.c index e4592dd850..45de872db6 100644 --- a/source3/utils/status.c +++ b/source3/utils/status.c @@ -375,6 +375,12 @@ static int traverse_sessionid(struct db_record *db, void *state) msg_ctx = messaging_init(NULL, procid_self(), event_context_init(NULL)); + if (msg_ctx == NULL) { + fprintf(stderr, "messaging_init failed\n"); + ret = -1; + goto done; + } + db_tdb2_setup_messaging(msg_ctx, true); if (!lp_load(get_dyn_CONFIGFILE(),False,False,False,True)) { -- cgit