assert(m);
+ manager_dispatch_cleanup_queue(m);
+
while ((j = hashmap_first(m->transaction_jobs)))
job_free(j);
assert(m);
- manager_dispatch_cleanup_queue(m);
manager_clear_jobs_and_units(m);
for (c = 0; c < _UNIT_TYPE_MAX; c++)
bus_unit_send_removed_signal(u);
+ if (u->meta.load_state != UNIT_STUB)
+ if (UNIT_VTABLE(u)->done)
+ UNIT_VTABLE(u)->done(u);
+
/* Detach from next 'bigger' objects */
SET_FOREACH(t, u->meta.names, i)
hashmap_remove_value(u->meta.manager->units, t, u);
if (u->meta.job)
job_free(u->meta.job);
- if (u->meta.load_state != UNIT_STUB)
- if (UNIT_VTABLE(u)->done)
- UNIT_VTABLE(u)->done(u);
-
cgroup_bonding_free_list(u->meta.cgroup_bondings);
for (d = 0; d < _UNIT_DEPENDENCY_MAX; d++)