chiark / gitweb /
job: allow job_free() only on already unlinked jobs
[elogind.git] / src / core / job.c
index f3c76d66b59dd85f1acd7948ca290c8ef7c9d0d3..5ea717eae1e58b421f07fc8e905865c6d065f110 100644 (file)
@@ -71,8 +71,10 @@ void job_free(Job *j) {
                 j->installed = false;
         }
 
-        /* Detach from next 'smaller' objects */
-        manager_transaction_unlink_job(j->manager, j, true);
+        assert(!j->transaction_prev);
+        assert(!j->transaction_next);
+        assert(!j->subject_list);
+        assert(!j->object_list);
 
         if (j->in_run_queue)
                 LIST_REMOVE(Job, run_queue, j->manager->run_queue, j);