diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-01-18 23:50:13 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-01-18 23:50:13 +0100 |
commit | 87d1515de5ae611e95144def9ef4b2c0c933f6fe (patch) | |
tree | 4cdeceee70826dffd460775aaddbea8e60e51eaa /job.c | |
parent | 91cdde8a7a08c6797995cc67f4b55ac43780cdd8 (diff) |
first try at implementing dependency loader
Diffstat (limited to 'job.c')
-rw-r--r-- | job.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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); } |