From ed071577e426744c08600f50e52cbf766c27868c Mon Sep 17 00:00:00 2001 From: Iraj Jamali Date: Tue, 18 Sep 2018 15:40:45 +0530 Subject: libglusterfs: NULL pointer dereferencing clang fix Problem: trav could be NULL. Solution: Adding a check to avoid clang error. Updates: bz#1622665 Change-Id: If26be82edea5e33c2356cea3769496f1cbd3774c Signed-off-by: Iraj Jamali --- libglusterfs/src/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libglusterfs') diff --git a/libglusterfs/src/inode.c b/libglusterfs/src/inode.c index ee85c0e793c..143a63f97b8 100644 --- a/libglusterfs/src/inode.c +++ b/libglusterfs/src/inode.c @@ -1793,7 +1793,7 @@ inode_table_destroy(inode_table_t *inode_table) * purge list. By this time there should not be any * inodes present in the active list except for root * inode. Its a ref_leak otherwise. */ - if (trav != inode_table->root) + if (trav && (trav != inode_table->root)) gf_msg_callingfn(THIS->name, GF_LOG_WARNING, 0, LG_MSG_REF_COUNT, "Active inode(%p) with refcount" -- cgit