diff options
author | Iraj Jamali <ijamali@redhat.com> | 2018-09-18 15:40:45 +0530 |
---|---|---|
committer | Niels de Vos <ndevos@redhat.com> | 2018-09-19 15:06:17 +0000 |
commit | ed071577e426744c08600f50e52cbf766c27868c (patch) | |
tree | 060275b7b36da02f579b500171669c8c3931ed67 /libglusterfs | |
parent | dc2c632d525cd23914bdc468ef6cf4335559867f (diff) |
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 <ijamali@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r-- | libglusterfs/src/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
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" |