device-mapper-multipath/0028-multipath-avoid-NULL-string-in-released_to_systemd.patch
Benjamin Marzinski c5432960d9 device-mapper-multipath-0.9.3-1
Update to the head of the upstream staging branch
  * Previous patches 0001-0042 are included in the source tarball
  * Patches 0001-0032 are from the upstream staging branch
Rename redhat patches
  * Previous patches 0043-0053 are now patches 0033-0043
Change back to using readline instead of libedit
  * The code the uses readline has been isolated from the code that
    is licensed gpl v2 only.
Add libmpathutil libraries to spec file
Add multipathc program to spec file
Add multipath.conf systemd tempfile configuration to spec file
Misc spec file cleanups
2022-11-16 14:11:59 -06:00

27 lines
923 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@suse.com>
Date: Tue, 27 Sep 2022 12:14:09 +0200
Subject: [PATCH] multipath: avoid NULL string in released_to_systemd()
Fixes: b28c406 ("multipath -u: don't grab devices already passed to system")
Signed-off-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
multipath/main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/multipath/main.c b/multipath/main.c
index 7b69a3ce..b9f360b4 100644
--- a/multipath/main.c
+++ b/multipath/main.c
@@ -435,7 +435,8 @@ static bool released_to_systemd(void)
bool ret;
ret = dm_mp_dev_path != NULL && !strcmp(dm_mp_dev_path, "0");
- condlog(4, "%s: %s=%s -> %d", __func__, dmdp, dm_mp_dev_path, ret);
+ condlog(4, "%s: %s=%s -> %d", __func__, dmdp,
+ dm_mp_dev_path ? dm_mp_dev_path : "", ret);
return ret;
}