diff options
author | Volker Lendecke <vl@samba.org> | 2008-06-13 12:00:24 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-08-13 11:54:04 +0200 |
commit | f72e28e24c2b13a957a8bbd3910d3b5294766923 (patch) | |
tree | 3a79fa50cc18b372e4caa9eabf49f1e83454b88c /source3 | |
parent | 034a97bc9cc8d48e6c779a4879feb62da6fc84e5 (diff) | |
download | samba-f72e28e24c2b13a957a8bbd3910d3b5294766923.tar.gz samba-f72e28e24c2b13a957a8bbd3910d3b5294766923.tar.bz2 samba-f72e28e24c2b13a957a8bbd3910d3b5294766923.zip |
Exit smbstatus cleanly if messaging_init fails
(This used to be commit 5fd51833a31b326d83ac2f76d06560920547f657)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/utils/status.c | 6 |
1 files changed, 6 insertions, 0 deletions
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)) { |