summaryrefslogtreecommitdiff
path: root/src/core/unit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/unit.c')
-rw-r--r--src/core/unit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index ba4c7d5b32..c9cd9ee2a0 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -258,6 +258,9 @@ bool unit_check_gc(Unit *u) {
if (unit_active_state(u) != UNIT_INACTIVE)
return true;
+ if (u->refs)
+ return true;
+
if (UNIT_VTABLE(u)->check_gc)
if (UNIT_VTABLE(u)->check_gc(u))
return true;