summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs_mgr/fs_mgr.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs_mgr/fs_mgr.c b/fs_mgr/fs_mgr.c
index 848743c..23682cb 100644
--- a/fs_mgr/fs_mgr.c
+++ b/fs_mgr/fs_mgr.c
@@ -457,11 +457,13 @@ int fs_mgr_mount_all(char *fstab_file)
for (i = 0; fstab[i].blk_dev; i++) {
#ifndef HAVE_SELINUX
- char *contextpos = strstr(fstab[i].fs_options,",context=");
+ if (fstab[i].fs_options) {
+ char *contextpos = strstr(fstab[i].fs_options,",context=");
- /* This makes it mandatory that context is the LAST mount option */
- if (contextpos != NULL) {
- *contextpos='\0';
+ /* This makes it mandatory that context is the LAST mount option */
+ if (contextpos != NULL) {
+ *contextpos='\0';
+ }
}
#endif