]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mount: check that MountParameters is valid before use
authorLuca Boccassi <bluca@debian.org>
Sat, 9 Dec 2023 11:56:50 +0000 (11:56 +0000)
committerLuca Boccassi <bluca@debian.org>
Sat, 9 Dec 2023 11:57:01 +0000 (11:57 +0000)
Follow-up for 6c75eff6afd90

CID#1530430

src/core/mount.c

index 654be17c473d280d642f5cf967f23cc5cc888252..ff97eebb597fd64bf1d757e7e3cfc055da96c907 100644 (file)
@@ -1201,7 +1201,7 @@ static void mount_enter_mounting(Mount *m) {
                 log_unit_warning_errno(UNIT(m), r, "Failed to create mount point '%s', ignoring: %m", m->where);
 
         /* If we are asked to create an OverlayFS, create the upper/work directories if they are missing */
-        if (streq_ptr(p->fstype, "overlay")) {
+        if (p && streq_ptr(p->fstype, "overlay")) {
                 _cleanup_strv_free_ char **dirs = NULL;
 
                 r = fstab_filter_options(