]> err.no Git - systemd/commitdiff
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 414816b6404c6afc6d651d40efc00892aa3f0d4c..f7bf7f32d400c4d06d87c5958453c1418c087752 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));
 }