summaryrefslogtreecommitdiffstats
path: root/xlators/features
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2019-05-17 11:04:45 +0530
committerAmar Tumballi <amarts@redhat.com>2019-06-03 04:00:39 +0000
commit899b2170945c6023b0037fed70b19aa3cc680a22 (patch)
treea276a2c5668c6301f6c8f9f279da281ddc38b347 /xlators/features
parent950726dfc8e3171bef625b563c0c6dbba1ec2928 (diff)
across: coverity fixes
* locks/posix.c: key was not freed in one of the cases. * locks/common.c: lock was being free'd out of context. * nfs/exports: handle case of missing free. * protocol/client: handle case of entry not freed. * storage/posix: handle possible case of double free CID: 1398628, 1400731, 1400732, 1400756, 1124796, 1325526 updates: bz#789278 Change-Id: Ieeaca890288bc4686355f6565f853dc8911344e8 Signed-off-by: Amar Tumballi <amarts@redhat.com> Signed-off-by: Sheetal Pamecha <spamecha@redhat.com>
Diffstat (limited to 'xlators/features')
-rw-r--r--xlators/features/locks/src/common.c1
-rw-r--r--xlators/features/locks/src/posix.c2
2 files changed, 1 insertions, 2 deletions
diff --git a/xlators/features/locks/src/common.c b/xlators/features/locks/src/common.c
index 0a9c9293f01..24422b494b9 100644
--- a/xlators/features/locks/src/common.c
+++ b/xlators/features/locks/src/common.c
@@ -1215,7 +1215,6 @@ pl_lock_preempt(pl_inode_t *pl_inode, posix_lock_t *reqlock)
{
pl_clean_local(rw->stub->frame->local);
call_unwind_error(rw->stub, -1, EBUSY);
- GF_FREE(lock);
}
return ret;
diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c
index 684a20824b0..d723d798804 100644
--- a/xlators/features/locks/src/posix.c
+++ b/xlators/features/locks/src/posix.c
@@ -1226,9 +1226,9 @@ pl_getxattr_clrlk(xlator_t *this, const char *name, inode_t *inode,
out:
GF_FREE(brickname);
GF_FREE(args.opts);
+ GF_FREE(key);
if (op_ret) {
GF_FREE(lk_summary);
- GF_FREE(key);
}
return op_ret;