From: Kern Sibbald Date: Sun, 25 Dec 2016 09:46:58 +0000 (+0100) Subject: Initialize freespace_mutex fixes bug 2207 X-Git-Tag: Release-7.4.5~8 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=07f53b4321bf581b18566c367fbc4db292aad1d9;p=bacula%2Fbacula Initialize freespace_mutex fixes bug 2207 --- diff --git a/bacula/src/stored/dev.c b/bacula/src/stored/dev.c index 8d07f4f3b9..7b54e03226 100644 --- a/bacula/src/stored/dev.c +++ b/bacula/src/stored/dev.c @@ -307,6 +307,12 @@ DEVICE *m_init_dev(JCR *jcr, DEVRES *device) Mmsg1(dev->errmsg, _("Unable to init acquire mutex: ERR=%s\n"), be.bstrerror(errstat)); Jmsg0(jcr, M_ERROR_TERM, 0, dev->errmsg); } + if ((errstat = dev->init_freespace_mutex()) != 0) { + berrno be; + dev->dev_errno = errstat; + Mmsg1(dev->errmsg, _("Unable to init freespace mutex: ERR=%s\n"), be.bstrerror(errstat)); + Jmsg0(jcr, M_ERROR_TERM, 0, dev->errmsg); + } if ((errstat = dev->init_read_acquire_mutex()) != 0) { berrno be; dev->dev_errno = errstat;