summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-06-04 22:34:07 +0200
committerLennart Poettering <lennart@poettering.net>2010-06-04 22:34:07 +0200
commit86d6515040a729779a58b8c70465563b9008cea1 (patch)
tree9f13f95e3584c38186c77cdc59596f7ac50fc636 /src
parent0b9ee5867b3218a3cb15f5902c47f5d839612608 (diff)
parenta013b84b49a7d4a30196949e24ea03066e227626 (diff)
Merge branch 'master' of ssh://git.freedesktop.org/git/systemd
Diffstat (limited to 'src')
-rw-r--r--src/manager.c3
-rw-r--r--src/unit.c8
2 files changed, 6 insertions, 5 deletions
diff --git a/src/manager.c b/src/manager.c
index 735a1aaa4d..e37aa83602 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -543,6 +543,8 @@ static void manager_clear_jobs_and_units(Manager *m) {
assert(m);
+ manager_dispatch_cleanup_queue(m);
+
while ((j = hashmap_first(m->transaction_jobs)))
job_free(j);
@@ -555,7 +557,6 @@ void manager_free(Manager *m) {
assert(m);
- manager_dispatch_cleanup_queue(m);
manager_clear_jobs_and_units(m);
for (c = 0; c < _UNIT_TYPE_MAX; c++)
diff --git a/src/unit.c b/src/unit.c
index c08091942e..695044a77f 100644
--- a/src/unit.c
+++ b/src/unit.c
@@ -319,6 +319,10 @@ void unit_free(Unit *u) {
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);
@@ -344,10 +348,6 @@ void unit_free(Unit *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++)