From: Eric Bollengier Date: Fri, 21 Jan 2022 15:39:33 +0000 (+0100) Subject: Fix #8608 About segfault when starting with incorrect configuration file X-Git-Tag: Release-11.3.2~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=565a777b1454bac2511bd01e836a395a56878924;p=thirdparty%2Fbacula.git Fix #8608 About segfault when starting with incorrect configuration file --- diff --git a/bacula/src/stored/stored.c b/bacula/src/stored/stored.c index 340ff2a29..1b185e764 100644 --- a/bacula/src/stored/stored.c +++ b/bacula/src/stored/stored.c @@ -385,7 +385,7 @@ static int check_resources() OK = false; } - if (!me->messages) { + if (me && !me->messages) { me->messages = (MSGS *)GetNextRes(R_MSGS, NULL); if (!me->messages) { Jmsg1(NULL, M_ERROR, 0, _("No Messages resource defined in %s. Cannot continue.\n"), @@ -394,7 +394,7 @@ static int check_resources() } } - if (!me->working_directory) { + if (me && !me->working_directory) { Jmsg1(NULL, M_ERROR, 0, _("No Working Directory defined in %s. Cannot continue.\n"), configfile); OK = false;