From 170357c303d5ba77bc18750c4e1fe00dcedbeb67 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Thu, 1 May 2014 12:31:17 +0200 Subject: [PATCH] Fix a SD seg fault that occurs with over committed drives --- bacula/src/stored/vol_mgr.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 */ -- 2.39.5