From: Martin Schwenke Date: Thu, 1 Jun 2017 04:37:40 +0000 (+1000) Subject: ctdb-common: Fix crash in logging initialisation X-Git-Tag: ldb-1.1.31~173 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c47e6b140d0c7cc15a93782957090625a832ba59;p=thirdparty%2Fsamba.git 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 --- 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; }