Commit 9d576438 authored by Lennart Poettering's avatar Lennart Poettering

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

parent 77030bd6
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment