summaryrefslogtreecommitdiffstats
path: root/glusterfsd/src/glusterfsd.c
diff options
context:
space:
mode:
authorIraj Jamali <ijamali@redhat.com>2018-10-23 14:18:40 +0530
committerAmar Tumballi <amarts@redhat.com>2018-11-20 03:14:35 +0000
commitfbfceb9f2ee240737b329de8aa5b13562f99fddb (patch)
tree162dea3de53d4a109ed31186710f1c5793b64c84 /glusterfsd/src/glusterfsd.c
parent4e0fab473a4ef8792e332efc83456bf63b540435 (diff)
glusterfsd: NULL pointer dereferencing clang fix
Added a check to avoid clang warning Updates: bz#1622665 Change-Id: If9ae4e4f2ae13c85dad0e87d8dd6930dde74bbda Signed-off-by: Iraj Jamali <ijamali@redhat.com>
Diffstat (limited to 'glusterfsd/src/glusterfsd.c')
-rw-r--r--glusterfsd/src/glusterfsd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
index f62fbf5e7c4..f9f263aae66 100644
--- a/glusterfsd/src/glusterfsd.c
+++ b/glusterfsd/src/glusterfsd.c
@@ -2561,7 +2561,7 @@ glusterfs_process_volfp(glusterfs_ctx_t *ctx, FILE *fp)
}
xlator_t *xl = graph->first;
- if (strcmp(xl->type, "protocol/server") == 0) {
+ if (xl && (strcmp(xl->type, "protocol/server") == 0)) {
(void)copy_opts_to_child(xl, FIRST_CHILD(xl), "*auth*");
}