]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/dircmd.c
Fix broken editing code
[bacula/bacula] / bacula / src / stored / dircmd.c
index 3e1e613c6fd0bd9a1631971f50ceafa8e08dc8bc..4f4a2d72f92967f6c3b04b52749ea28b9584191f 100644 (file)
@@ -814,6 +814,7 @@ static bool unmount_cmd(JCR *jcr)
             if (!unload_autochanger(dcr, -1)) {
                /* ***FIXME**** what is this ????  */
                dev->close();
+               free_volume(dev);
             }
             if (dev->is_unmountable() && !dev->unmount(0)) {
                dir->fsend(_("3907 %s"), dev->bstrerror());
@@ -845,6 +846,7 @@ static bool unmount_cmd(JCR *jcr)
             clear_thread_id(dev->no_wait_id);
             if (!unload_autochanger(dcr, -1)) {
                dev->close();
+               free_volume(dev);
             }
             if (dev->is_unmountable() && !dev->unmount(0)) {
                dir->fsend(_("3907 %s"), dev->bstrerror());