chiark / gitweb /
unit: don't gc units that are still in STUB state
authorLennart Poettering <lennart@poettering.net>
Tue, 18 May 2010 02:05:27 +0000 (04:05 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 18 May 2010 02:05:27 +0000 (04:05 +0200)
src/unit.c

index 1959b1b..374d2e1 100644 (file)
@@ -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;