1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

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 c9124a001f
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
This commit is contained in:
Martin Schwenke 2017-06-01 14:37:40 +10:00 committed by Amitay Isaacs
parent 822f8cdfea
commit c47e6b140d

View File

@ -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;
}