summaryrefslogtreecommitdiffstats
path: root/xlators/features/shard
diff options
context:
space:
mode:
authorSusant Palai <spalai@redhat.com>2018-11-08 12:27:07 +0530
committerAmar Tumballi <amarts@redhat.com>2018-11-14 18:47:08 +0000
commit3e20df8674d489fba707079e2b5a58347a3b3928 (patch)
treec44a9670bcf132832ba93dd09b8fca96d0d2972d /xlators/features/shard
parent142b840fe14c3b4281a0eaeede918c3e121de84b (diff)
feature/shard: Fix coverity issue - Use after free
CID: 1325524 Change-Id: Ic713285bd9e76d8e4dc1815aa471087d279008b5 updates: bz#789278 Signed-off-by: Susant Palai <spalai@redhat.com>
Diffstat (limited to 'xlators/features/shard')
-rw-r--r--xlators/features/shard/src/shard.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/features/shard/src/shard.c b/xlators/features/shard/src/shard.c
index b63236884d3..5ffeaa63628 100644
--- a/xlators/features/shard/src/shard.c
+++ b/xlators/features/shard/src/shard.c
@@ -5050,9 +5050,9 @@ shard_post_lookup_readv_handler(call_frame_t *frame, xlator_t *this)
goto err;
}
+ memset(iobuf->ptr, 0, local->total_size);
iobuf_unref(iobuf);
local->iobuf = iobuf;
- memset(iobuf->ptr, 0, local->total_size);
local->dot_shard_loc.inode = inode_find(this->itable, priv->dot_shard_gfid);
if (!local->dot_shard_loc.inode) {