From: Kern Sibbald Date: Thu, 1 May 2014 10:31:17 +0000 (+0200) Subject: Fix a SD seg fault that occurs with over committed drives X-Git-Tag: Release-7.0.3~16 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=170357c303d5ba77bc18750c4e1fe00dcedbeb67;p=bacula%2Fbacula Fix a SD seg fault that occurs with over committed drives --- diff --git a/bacula/src/stored/vol_mgr.c b/bacula/src/stored/vol_mgr.c index 3a317150f5..31bf14a6ce 100644 --- a/bacula/src/stored/vol_mgr.c +++ b/bacula/src/stored/vol_mgr.c @@ -517,9 +517,12 @@ VOLRES *reserve_volume(DCR *dcr, const char *VolumeName) Mmsg1(jcr->errmsg, _("Volume %s is busy swapping.\n"), vol->vol_name); } - } else { - Mmsg2(jcr->errmsg, _("%s device %s is busy.\n"), + } else if (vol->dev) { + Mmsg2(jcr->errmsg, _("%s device %s is busy.\n"), vol->dev->print_type(), vol->dev->print_name()); + } else { + Mmsg1(jcr->errmsg, _("Volume %s is busy swapping.\n"), + vol->vol_name); } debug_list_volumes("failed swap"); vol = NULL; /* device busy */