From: Lennart Poettering Date: Sun, 5 Sep 2010 23:04:59 +0000 (+0200) Subject: automount: make sure we don't crash if there's an automount unit without mount unit X-Git-Tag: v10~42 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7573916f6388624c800bbe22a2113ac59f231d7c;p=systemd automount: make sure we don't crash if there's an automount unit without mount unit --- diff --git a/src/automount.c b/src/automount.c index 414816b6..f7bf7f32 100644 --- a/src/automount.c +++ b/src/automount.c @@ -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)); }