summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-03-13 03:34:42 +0100
committerLennart Poettering <lennart@poettering.net>2012-03-13 03:34:42 +0100
commit9631c090fd61070797f3a6139f873a3cabc5d28a (patch)
treef7f3c4cc4bc83aa105b26bed559ca53a3eced78a /src
parent62f168a05b5a0b81a75a50791b80ae700dd00afb (diff)
mount: fix assertion
https://bugzilla.redhat.com/show_bug.cgi?id=768523
Diffstat (limited to 'src')
-rw-r--r--src/mount.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mount.c b/src/mount.c
index 982715a6db..ed0f819c7b 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;