]> err.no Git - systemd/commitdiff
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 1959b1b940074d0ff23dd81ed3be72d511814f6a..374d2e133106def502cca34b9e24f364af1d9cdd 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;