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: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=7573916f6388624c800bbe22a2113ac59f231d7c 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 414816b64..f7bf7f32d 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)); }