From: Karel Zak Date: Thu, 16 Jan 2025 16:10:25 +0000 (+0100) Subject: lsns: check for mnt_fs_get_target return value X-Git-Tag: v2.42-start~88 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1ce07db0c1b2344c8259f16c2a153a3b3f8fc527;p=thirdparty%2Futil-linux.git lsns: check for mnt_fs_get_target return value Signed-off-by: Karel Zak --- diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c index 93bbd758b..6b2dcba96 100644 --- a/sys-utils/lsns.c +++ b/sys-utils/lsns.c @@ -1012,7 +1012,8 @@ static int read_persistent_namespaces(struct lsns *ls) continue; if (get_namespace(ls, ino)) continue; - + if (!mnt_fs_get_target(fs)) + continue; fd = open(mnt_fs_get_target(fs), O_RDONLY); if (fd < 0) continue; @@ -1137,7 +1138,6 @@ static int nsfs_xasputs(char **str, if (!*str) xasprintf(str, "%s", tgt); - else if (!is_path_included(*str, tgt, sep)) { char *tmp = NULL;