From 698abcfd6eeda58d17c215337f3357e1dd0c962e Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Thu, 1 Jun 2017 14:37:40 +1000 Subject: [PATCH] ctdb-common: Fix crash in logging initialisation Setting CTDB_LOGGING to syslog:nonblocking or syslog:udp will cause ctdbd to crash at startup due to NULL pointer dereference. Refactoring in commit c9124a001f5abf7bb577a8f5341da4cc7411ed22 introduced this regression. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12814 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Thu Jun 1 15:26:19 CEST 2017 on sn-devel-144 (cherry picked from commit c47e6b140d0c7cc15a93782957090625a832ba59) --- ctdb/common/logging.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ctdb/common/logging.c b/ctdb/common/logging.c index e1b8e7f..0e3efe0 100644 --- a/ctdb/common/logging.c +++ b/ctdb/common/logging.c @@ -354,6 +354,7 @@ static int syslog_log_setup_common(TALLOC_CTX *mem_ctx, const char *app_name, state->app_name = app_name; talloc_set_destructor(state, syslog_log_state_destructor); + *result = state; return 0; } -- 2.9.4