summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorSunny Kumar <sunkumar@redhat.com>2018-10-17 15:40:04 +0530
committerKrutika Dhananjay <kdhananj@redhat.com>2018-10-18 05:02:46 +0000
commit145e180517054626d07892219fdee689b703c218 (patch)
tree5b1801c8e9822a0edc72987b927792ba29124adf /xlators
parent219cd649fdbd7bfd6c2268a0a4f66bcc15918e31 (diff)
shard : fix newly introduced coverity
This patch fixes CID: 1396177: NULL dereference. updates: bz#789278 Change-Id: Ic5d302a5e32d375acf8adc412763ab94e6dabc3d Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/features/shard/src/shard.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/features/shard/src/shard.c b/xlators/features/shard/src/shard.c
index d5f55efa0bc..9506b662fe2 100644
--- a/xlators/features/shard/src/shard.c
+++ b/xlators/features/shard/src/shard.c
@@ -2926,7 +2926,8 @@ shard_unlink_block_inode(shard_local_t *local, int shard_block_num)
list_del_init(&ctx->to_fsync_list);
if (base_inode)
__shard_inode_ctx_get(base_inode, this, &base_ictx);
- base_ictx->fsync_count--;
+ if (base_ictx)
+ base_ictx->fsync_count--;
}
}
UNLOCK(&inode->lock);