diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-04-21 06:01:13 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-04-21 06:01:13 +0200 |
commit | 701cc384c283206a29b21e4e7302e5cf5f2d9433 (patch) | |
tree | 0e8e47d12cb3ea47794bad390658c900ed61d691 /job.c | |
parent | 48507e6621596b0d5503fad6cd9e0685917603f5 (diff) |
manager: automatically GC unreferenced units
Diffstat (limited to 'job.c')
-rw-r--r-- | job.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -58,8 +58,10 @@ void job_free(Job *j) { if (j->installed) { bus_job_send_removed_signal(j); - if (j->unit->meta.job == j) + if (j->unit->meta.job == j) { j->unit->meta.job = NULL; + unit_add_to_gc_queue(j->unit); + } hashmap_remove(j->manager->jobs, UINT32_TO_PTR(j->id)); j->installed = false; |