From: Lennart Poettering Date: Tue, 13 Mar 2012 02:34:42 +0000 (+0100) Subject: mount: fix assertion X-Git-Tag: v44~42 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9631c090fd61070797f3a6139f873a3cabc5d28a;p=systemd mount: fix assertion https://bugzilla.redhat.com/show_bug.cgi?id=768523 --- diff --git a/src/mount.c b/src/mount.c index 982715a6..ed0f819c 100644 --- a/src/mount.c +++ b/src/mount.c @@ -189,7 +189,7 @@ static int mount_add_mount_links(Mount *m) { if ((r = unit_add_dependency(UNIT(n), UNIT_REQUIRES, UNIT(m), true)) < 0) return r; - } else if (pm && path_startswith(pm->what, n->where)) { + } else if (pm && pm->what && path_startswith(pm->what, n->where)) { if ((r = unit_add_dependency(UNIT(m), UNIT_AFTER, UNIT(n), true)) < 0) return r; @@ -197,7 +197,7 @@ static int mount_add_mount_links(Mount *m) { if ((r = unit_add_dependency(UNIT(m), UNIT_REQUIRES, UNIT(n), true)) < 0) return r; - } else if (pn && path_startswith(pn->what, m->where)) { + } else if (pn && pn->what && path_startswith(pn->what, m->where)) { if ((r = unit_add_dependency(UNIT(n), UNIT_AFTER, UNIT(m), true)) < 0) return r;