Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
LU-3042 build: fix 'NULL pointer dereference' errors
[fs/lustre-release.git]
/
lustre
/
utils
/
mount_utils_ldiskfs.c
diff --git
a/lustre/utils/mount_utils_ldiskfs.c
b/lustre/utils/mount_utils_ldiskfs.c
index
9ce1e8f
..
7915967
100644
(file)
--- a/
lustre/utils/mount_utils_ldiskfs.c
+++ b/
lustre/utils/mount_utils_ldiskfs.c
@@
-983,7
+983,8
@@
int set_blockdev_tunables(char *source, struct mount_opts *mop, int fan_out)
chk_major = strtok_r(buf, ":", &savept);
chk_minor = savept;
- if (major == atoi(chk_major) &&minor == atoi(chk_minor))
+ if (chk_major != NULL && major == atoi(chk_major) &&
+ chk_minor != NULL && minor == atoi(chk_minor))
break;
}