summaryrefslogtreecommitdiff
path: root/src/automount.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-09-06 01:04:59 +0200
committerLennart Poettering <lennart@poettering.net>2010-09-06 01:05:38 +0200
commit7573916f6388624c800bbe22a2113ac59f231d7c (patch)
tree94c948162f9fcdfd9a211d369c04e5f96cbc19fa /src/automount.c
parentdacdf153675637258d155faa592b247837b05e42 (diff)
automount: make sure we don't crash if there's an automount unit without mount unit
Diffstat (limited to 'src/automount.c')
-rw-r--r--src/automount.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/automount.c b/src/automount.c
index 414816b640..f7bf7f32d4 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));
}