From 0299f7f0f7c4d8e5e7e04d8bc1787ecbee6dbe52 Mon Sep 17 00:00:00 2001 From: Ravishankar N Date: Fri, 19 Dec 2014 16:38:43 +0530 Subject: afr: coverity fixes Some fixes for the 17th Dec 2014 run. https://scan6.coverity.com:8443/reports.htm#v31028/p10714/g31029 Change-Id: Ia4410ef87a56fffb61803d0a4e62369b058e1cfb BUG: 1176089 Signed-off-by: Ravishankar N Reviewed-on: http://review.gluster.org/9314 Tested-by: Gluster Build System Reviewed-by: Pranith Kumar Karampuri Tested-by: Pranith Kumar Karampuri --- xlators/cluster/afr/src/afr-dir-write.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'xlators/cluster/afr/src/afr-dir-write.c') diff --git a/xlators/cluster/afr/src/afr-dir-write.c b/xlators/cluster/afr/src/afr-dir-write.c index f5c385c34a4..4cee1ed9bea 100644 --- a/xlators/cluster/afr/src/afr-dir-write.c +++ b/xlators/cluster/afr/src/afr-dir-write.c @@ -314,7 +314,6 @@ afr_mark_new_entry_changelog (call_frame_t *frame, xlator_t *this) goto out; new_local->pending = changelog; - changelog = NULL; uuid_copy (new_local->loc.gfid, local->cont.dir_fop.buf.ia_gfid); new_local->loc.inode = inode_ref (local->inode); @@ -335,8 +334,6 @@ afr_mark_new_entry_changelog (call_frame_t *frame, xlator_t *this) new_frame = NULL; out: - if (changelog) - afr_matrix_cleanup (changelog, priv->child_count); if (new_frame) AFR_STACK_DESTROY (new_frame); if (xattr) @@ -1103,8 +1100,10 @@ afr_rename (call_frame_t *frame, xlator_t *this, loc_t *oldloc, loc_t *newloc, priv = this->private; transaction_frame = copy_frame (frame); - if (!transaction_frame) + if (!transaction_frame) { op_errno = ENOMEM; + goto out; + } local = AFR_FRAME_INIT (transaction_frame, op_errno); if (!local) -- cgit