From: Luca Boccassi Date: Sat, 9 Dec 2023 11:56:50 +0000 (+0000) Subject: mount: check that MountParameters is valid before use X-Git-Tag: v256-rc1~1541^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9614dd542b76fdb1c0a4eac6ae5104b6e1b6b0da;p=thirdparty%2Fsystemd.git mount: check that MountParameters is valid before use Follow-up for 6c75eff6afd90 CID#1530430 --- diff --git a/src/core/mount.c b/src/core/mount.c index 654be17c473..ff97eebb597 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(