diff options
Diffstat (limited to 'libmount/src')
-rw-r--r-- | libmount/src/tab.c | 4 |
1 files changed, 3 insertions, 1 deletions
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)) |