]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix a SD seg fault that occurs with over committed drives
authorKern Sibbald <kern@sibbald.com>
Thu, 1 May 2014 10:31:17 +0000 (12:31 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 3 May 2014 07:02:25 +0000 (09:02 +0200)
bacula/src/stored/vol_mgr.c

index 3a317150f549e28b676369e49ebd31414b9b597d..31bf14a6ce359d04c89131afa91a99a5ce8fc3eb 100644 (file)
@@ -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 */