chiark / gitweb /
automount: make sure we don't crash if there's an automount unit without mount unit
authorLennart Poettering <lennart@poettering.net>
Sun, 5 Sep 2010 23:04:59 +0000 (01:04 +0200)
committerLennart Poettering <lennart@poettering.net>
Sun, 5 Sep 2010 23:05:38 +0000 (01:05 +0200)
src/automount.c

index 414816b..f7bf7f3 100644 (file)
@@ -735,6 +735,9 @@ static bool automount_check_gc(Unit *u) {
 
         assert(a);
 
+        if (!a->mount)
+                return false;
+
         return UNIT_VTABLE(UNIT(a->mount))->check_gc(UNIT(a->mount));
 }