]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/pythondir.c
- Fix the block listing bug pointed out by Arno.
[bacula/bacula] / bacula / src / dird / pythondir.c
index 233f1f9ff808173e2e7506c37c84b6afb8d175fe..17e2f58984062fad96eded91da308bc6d7576b2e 100644 (file)
@@ -8,7 +8,7 @@
  *
  */
 /*
-   Copyright (C) 2004-2005 Kern Sibbald
+   Copyright (C) 2004-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
@@ -242,7 +242,9 @@ bail_out:
    return -1;
 }
 
-
+/*
+ * Set pointer to instantiated events class
+ */
 static PyObject *set_job_events(PyObject *self, PyObject *arg)
 {
    PyObject *eObject;
@@ -261,7 +263,7 @@ static PyObject *set_job_events(PyObject *self, PyObject *arg)
    return Py_None;
 }
 
-/* Run a Bacula command */
+/* Run a Bacula job */
 static PyObject *job_run(PyObject *self, PyObject *arg)
 {
    JCR *jcr;
@@ -335,7 +337,6 @@ static PyObject *job_cancel(PyObject *self, PyObject *args)
    }
    foreach_jcr(jcr) {
       if (jcr->JobId == 0) {
-         free_jcr(jcr);
          continue;
       }
       if (jcr->JobId == JobId) {
@@ -343,6 +344,8 @@ static PyObject *job_cancel(PyObject *self, PyObject *args)
          break;
       }
    }
+   /* endeach_jcr(jcr) not needed because freed below */
+
    if (!found) {
       /* ***FIXME*** raise exception */
       return NULL;