diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-06-04 22:31:33 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-06-04 22:31:33 +0200 |
commit | a013b84b49a7d4a30196949e24ea03066e227626 (patch) | |
tree | 8ddc11c70c840204cc989c2fae43493a768bd25b /src/unit.c | |
parent | 6dded4c70528150a771f51ce6f15a22c39df9109 (diff) |
unit: avoid assert on daemon reload
Diffstat (limited to 'src/unit.c')
-rw-r--r-- | src/unit.c | 8 |
1 files changed, 4 insertions, 4 deletions
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++) |