From: Kern Sibbald Date: Thu, 1 Apr 2004 19:56:04 +0000 (+0000) Subject: Don't allocated a DCR twice X-Git-Tag: Release-1.34.0~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76dc77f1c8b2ad9087e8ff0a743b1b279d3f3209;p=thirdparty%2Fbacula.git Don't allocated a DCR twice git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1172 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/stored/acquire.c b/bacula/src/stored/acquire.c index 92434f2c3..fb95102ce 100644 --- a/bacula/src/stored/acquire.c +++ b/bacula/src/stored/acquire.c @@ -32,6 +32,9 @@ static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; DCR *new_dcr(JCR *jcr, DEVICE *dev) { + if (jcr && jcr->dcr) { + return jcr->dcr; + } DCR *dcr = (DCR *)malloc(sizeof(DCR)); memset(dcr, 0, sizeof(DCR)); if (jcr) {