+/*
+ Bacula® - The Network Backup Solution
+
+ Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
+
+ The main author of Bacula is Kern Sibbald, with contributions from
+ many others, a complete list can be found in the file AUTHORS.
+ This program is Free Software; you can redistribute it and/or
+ modify it under the terms of version two of the GNU General Public
+ License as published by the Free Software Foundation plus additions
+ that are listed in the file LICENSE.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+ Bacula® is a registered trademark of John Walker.
+ The licensor of Bacula is the Free Software Foundation Europe
+ (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+ Switzerland, email:ftf@fsfeurope.org.
+*/
/*
* Manipulation routines for Job Control Records and
* handling of last_jobs_list.
* re-reading of the config file, no recursion is needed.
*
*/
-/*
- Copyright (C) 2000-2006 Kern Sibbald
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- version 2 as amended with additional clauses defined in the
- file LICENSE in the main source directory.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- the file LICENSE for additional details.
-
- */
#include "bacula.h"
#include "jcr.h"
/* External variables we reference */
extern time_t watchdog_time;
+/* External referenced functions */
+void free_bregexps(alist *bregexps);
+
/* Forward referenced functions */
extern "C" void timeout_handler(int sig);
static void jcr_timeout_check(watchdog_t *self);
}
jcr->destroy_mutex();
- delete jcr->msg_queue;
+ if (jcr->msg_queue) {
+ delete jcr->msg_queue;
+ jcr->msg_queue = NULL;
+ }
close_msg(jcr); /* close messages for this job */
/* do this after closing messages */
free(jcr->where);
jcr->where = NULL;
}
+ if (jcr->RegexWhere) {
+ free(jcr->RegexWhere);
+ jcr->RegexWhere = NULL;
+ }
+ if (jcr->where_bregexp) {
+ free_bregexps(jcr->where_bregexp);
+ delete jcr->where_bregexp;
+ jcr->where_bregexp = NULL;
+ }
if (jcr->cached_path) {
free_pool_memory(jcr->cached_path);
jcr->cached_path = NULL;