summaryrefslogtreecommitdiff
path: root/ctdb/common
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2017-06-01 14:37:40 +1000
committerAmitay Isaacs <amitay@samba.org>2017-06-01 15:26:19 +0200
commitc47e6b140d0c7cc15a93782957090625a832ba59 (patch)
tree8f9fee2832dfb119d245e16e06dede0ea5efbada /ctdb/common
parent822f8cdfeaa632444c84a845bcd5916806e70630 (diff)
downloadsamba-c47e6b140d0c7cc15a93782957090625a832ba59.tar.gz
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 <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Thu Jun 1 15:26:19 CEST 2017 on sn-devel-144
Diffstat (limited to 'ctdb/common')
-rw-r--r--ctdb/common/logging.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ctdb/common/logging.c b/ctdb/common/logging.c
index e1b8e7f2ecd..0e3efe0a728 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;
}