From: Lennart Poettering Date: Tue, 18 May 2010 02:05:27 +0000 (+0200) Subject: unit: don't gc units that are still in STUB state X-Git-Tag: 0.git+20100605+dfd8ee-1~11^2^2~70 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b86d44e5abc05dd13ad89cf1a4a69f32203f73e6;p=systemd unit: don't gc units that are still in STUB state --- diff --git a/src/unit.c b/src/unit.c index 1959b1b9..374d2e13 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;