summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-05-18 04:05:27 +0200
committerLennart Poettering <lennart@poettering.net>2010-05-18 04:05:27 +0200
commitb86d44e5abc05dd13ad89cf1a4a69f32203f73e6 (patch)
treebd3f69784bb339f4247a0fb725088dabf4af55d1
parent21de3988abfdf69e7c1e2d00a087e2d8b18ad758 (diff)
unit: don't gc units that are still in STUB state
-rw-r--r--src/unit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/unit.c b/src/unit.c
index 1959b1b940..374d2e1331 100644
--- a/src/unit.c
+++ b/src/unit.c
@@ -213,6 +213,9 @@ int unit_set_description(Unit *u, const char *description) {
bool unit_check_gc(Unit *u) {
assert(u);
+ if (u->meta.load_state == UNIT_STUB)
+ return true;
+
if (UNIT_VTABLE(u)->no_gc)
return true;