From fbfceb9f2ee240737b329de8aa5b13562f99fddb Mon Sep 17 00:00:00 2001 From: Iraj Jamali Date: Tue, 23 Oct 2018 14:18:40 +0530 Subject: glusterfsd: NULL pointer dereferencing clang fix Added a check to avoid clang warning Updates: bz#1622665 Change-Id: If9ae4e4f2ae13c85dad0e87d8dd6930dde74bbda Signed-off-by: Iraj Jamali --- glusterfsd/src/glusterfsd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'glusterfsd') 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*"); } -- cgit