diff options
author | Dave Reisner <dreisner@archlinux.org> | 2013-10-05 00:22:40 +0200 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2013-10-05 00:23:53 +0200 |
commit | 9c03872bc8fb2a381eafe7301ef9811b641686dd (patch) | |
tree | d14c9ea55e3448888b58e353f4ff8d26a8fb16d3 /src/core/mount.c | |
parent | logind: fix bus introspection data for TakeControl() (diff) | |
download | systemd-9c03872bc8fb2a381eafe7301ef9811b641686dd.tar.xz systemd-9c03872bc8fb2a381eafe7301ef9811b641686dd.zip |
mount: check for NULL before reading pm->what
Since a57f7e2c828b85, a mount unit with garbage in it would cause
systemd to crash on loading it.
ref: https://bugs.freedesktop.org/show_bug.cgi?id=70148
Diffstat (limited to 'src/core/mount.c')
-rw-r--r-- | src/core/mount.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/mount.c b/src/core/mount.c index 93bfa99f3f..db055f0a00 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -182,7 +182,7 @@ static int mount_add_mount_links(Mount *m) { * for the source path (if this is a bind mount) to be * available. */ pm = get_mount_parameters_fragment(m); - if (pm && path_is_absolute(pm->what)) { + if (pm && pm->what && path_is_absolute(pm->what)) { r = unit_require_mounts_for(UNIT(m), pm->what); if (r < 0) return r; |