summaryrefslogtreecommitdiff
path: root/job.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-01-18 23:50:13 +0100
committerLennart Poettering <lennart@poettering.net>2010-01-18 23:50:13 +0100
commit87d1515de5ae611e95144def9ef4b2c0c933f6fe (patch)
tree4cdeceee70826dffd460775aaddbea8e60e51eaa /job.c
parent91cdde8a7a08c6797995cc67f4b55ac43780cdd8 (diff)
first try at implementing dependency loader
Diffstat (limited to 'job.c')
-rw-r--r--job.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/job.c b/job.c
index 5cd8f73a91..689908aeb4 100644
--- a/job.c
+++ b/job.c
@@ -47,13 +47,16 @@ void job_free(Job *j) {
/* Detach from next 'bigger' objects */
if (j->linked) {
- if (j->name && j->name->meta.job == j)
- j->name->meta.job = NULL;
+ assert(j->name);
+ assert(j->name->meta.job == j);
+ j->name->meta.job = NULL;
hashmap_remove(j->manager->jobs, UINT32_TO_PTR(j->id));
}
- /* Free data and next 'smaller' objects */
+ hashmap_remove(j->manager->jobs_to_add, j->name);
+ set_remove(j->manager->jobs_to_remove, j);
+ /* Free data and next 'smaller' objects */
free(j);
}