From 3e44e75dae38cce3423cf5270c5edfd1079ca438 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 29 Sep 2016 11:55:07 +0200 Subject: libmount: paranoid change in mnt_table_is_fs_mounted() Signed-off-by: Karel Zak --- libmount/src/tab.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libmount/src/tab.c') diff --git a/libmount/src/tab.c b/libmount/src/tab.c index 9c49ec885..f72dcf1c2 100644 --- a/libmount/src/tab.c +++ b/libmount/src/tab.c @@ -1577,7 +1577,9 @@ int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs) } if (root) { - if (strcmp(mnt_fs_get_fstype(fs), "cifs") == 0) { + const char *fstype = mnt_fs_get_fstype(fs); + + if (fstype && strcmp(fstype, "cifs") == 0) { const char *unc_subdir = get_cifs_unc_subdir_path(src); const char *path_on_fs = mnt_fs_get_root(fs); if (!unc_subdir || !path_on_fs || !streq_paths(unc_subdir, path_on_fs)) -- cgit v1.2.3-55-g7522