]> err.no Git - systemd/commitdiff
mount: fix assertion
authorLennart Poettering <lennart@poettering.net>
Tue, 13 Mar 2012 02:34:42 +0000 (03:34 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 13 Mar 2012 02:34:42 +0000 (03:34 +0100)
https://bugzilla.redhat.com/show_bug.cgi?id=768523

src/mount.c

index 982715a6dba86ddd2f34c6666ab53318de3f1c93..ed0f819c7ba71090449541b5f8cf904ce6eb6efe 100644 (file)
@@ -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;