mount: check that MountParameters is valid before use

Follow-up for 6c75eff6af

CID#1530430
This commit is contained in:
Luca Boccassi
2023-12-09 11:57:01 +00:00
parent 7ba8260c46
commit 9614dd542b
+1 -1
View 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(