summaryrefslogtreecommitdiffstats
path: root/xlators/storage/bd
diff options
context:
space:
mode:
authorM. Mohan Kumar <mohan@in.ibm.com>2013-11-15 18:23:29 +0530
committerVijay Bellur <vbellur@redhat.com>2013-11-19 09:58:55 -0800
commit56d0124224259ccfc4c8b1cc33939902ed480d23 (patch)
tree35e31f55fabe106e0107b683380a885a4bf7adaf /xlators/storage/bd
parent1ef8a597db1ead482612f2f0bcc212d9a1349ccb (diff)
BD fixes for coverity scan
BUG: 1028672 Change-Id: I2e7889fb113cedd2d5928b210149d3fd7b8b22ab Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Reviewed-on: http://review.gluster.org/6292 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/storage/bd')
-rw-r--r--xlators/storage/bd/src/bd.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/xlators/storage/bd/src/bd.c b/xlators/storage/bd/src/bd.c
index 405474c..1eb5cd1 100644
--- a/xlators/storage/bd/src/bd.c
+++ b/xlators/storage/bd/src/bd.c
@@ -1102,7 +1102,7 @@ out:
if (local->fd)
BD_STACK_UNWIND (fsetxattr, frame, op_ret, op_errno, NULL);
else
- BD_STACK_UNWIND (setxattr, frame, op_errno, op_errno, NULL);
+ BD_STACK_UNWIND (setxattr, frame, op_ret, op_errno, NULL);
return 0;
}
@@ -2328,11 +2328,15 @@ init (xlator_t *this)
return 0;
error:
- GF_FREE (_private->vg);
- if (_private->handle)
- lvm_quit (_private->handle);
+ if (_private) {
+ GF_FREE (_private->vg);
+ if (_private->handle)
+ lvm_quit (_private->handle);
+ GF_FREE (_private);
+ }
+
mem_pool_destroy (this->local_pool);
- GF_FREE (_private);
+
return -1;
}