[systemd-commits] src/core

Lennart Poettering lennart at kemper.freedesktop.org
Mon Sep 10 01:13:25 PDT 2012


 src/core/unit.c |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 9d576438a1ee932bde1fb0f1be1aa5cae646fd4e
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Sep 10 10:12:10 2012 +0200

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

diff --git a/src/core/unit.c b/src/core/unit.c
index ba4c7d5..c9cd9ee 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;



More information about the systemd-commits mailing list