]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/job.c
Turn off debug
[bacula/bacula] / bacula / src / dird / job.c
index bd0be764f82ba27438943b1363c4582f7c2642cf..5e6a2334210fb828f5e485e06c85186b3fc79ab7 100644 (file)
@@ -802,14 +802,14 @@ void dird_free_jcr(JCR *jcr)
       pthread_cond_destroy(&jcr->term_wait);
       jcr->term_wait_inited = false;
    }
+   if (jcr->db_batch && jcr->db_batch != jcr->db) {
+      db_close_database(jcr, jcr->db_batch);
+   }
+   jcr->db_batch = NULL;
    if (jcr->db) {
       db_close_database(jcr, jcr->db);
       jcr->db = NULL;
    }
-   if (jcr->db_batch) {
-      db_close_database(jcr, jcr->db_batch);
-      jcr->db_batch = NULL;
-   }
    if (jcr->stime) {
       Dmsg0(200, "Free JCR stime\n");
       free_pool_memory(jcr->stime);