unit: don't allow units to be gc'ed that still are referenced via UnitRef

This commit is contained in:
Lennart Poettering
2012-09-10 10:12:10 +02:00
parent 77030bd65f
commit 9d576438a1
+3
View File
@@ -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;