From 9614dd542b76fdb1c0a4eac6ae5104b6e1b6b0da Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Sat, 9 Dec 2023 11:56:50 +0000 Subject: [PATCH] mount: check that MountParameters is valid before use Follow-up for 6c75eff6afd90 CID#1530430 --- src/core/mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/mount.c b/src/core/mount.c index 654be17c47..ff97eebb59 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -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( -- 2.25.1