summaryrefslogtreecommitdiffstats
path: root/xlators/storage
diff options
context:
space:
mode:
authorSunny Kumar <sunkumar@redhat.com>2018-09-21 00:40:46 +0530
committerAmar Tumballi <amarts@redhat.com>2018-09-21 05:11:19 +0000
commit2fd9d62691056b9f0601dbc2bf6f42626b015d07 (patch)
tree507944b48643c1f3a503c418d365d99a007afbb2 /xlators/storage
parentece878fac815db5a1ea4d0078a48a05dbcc0c276 (diff)
block : fix coverity in bd.c
This patch fixes CID 1288097, 1128921, and 1128918 all of type RESOURCE_LEAK. Change-Id: If39be19c6310eab9880de6f0bebb4f38604a40b2 updates: bz#789278 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
Diffstat (limited to 'xlators/storage')
-rw-r--r--xlators/storage/bd/src/bd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/storage/bd/src/bd.c b/xlators/storage/bd/src/bd.c
index c66ce93b79e..0b399157238 100644
--- a/xlators/storage/bd/src/bd.c
+++ b/xlators/storage/bd/src/bd.c
@@ -1054,6 +1054,8 @@ bd_setx_stat_cbk(call_frame_t *frame, void *cookie, xlator_t *this, int op_ret,
FIRST_CHILD(this)->fops->setxattr, &local->loc, local->dict,
0, NULL);
+ if (copy)
+ GF_FREE(copy);
return 0;
out:
@@ -1158,6 +1160,8 @@ bd_offload_getx_cbk(call_frame_t *frame, void *cookie, xlator_t *this,
FIRST_CHILD(this)->fops->setxattr, local->dloc, local->dict, 0,
NULL);
+ if (type)
+ GF_FREE(type);
return 0;
out:
@@ -1327,6 +1331,8 @@ bd_offload(call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd,
STACK_WIND(frame, bd_offload_dest_lookup_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->lookup, local->dloc, local->dict);
+ if (param_copy)
+ GF_FREE(param_copy);
return 0;
out: