]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix #8608 About segfault when starting with incorrect configuration file
authorEric Bollengier <eric@baculasystems.com>
Fri, 21 Jan 2022 15:39:33 +0000 (16:39 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:03:28 +0000 (09:03 +0100)
bacula/src/stored/stored.c

index 340ff2a299ed5001a7fce25f8db5cfa9eca03708..1b185e764b8c7db9754311720250aeefe249b899 100644 (file)
@@ -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;