summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorPoornima <pgurusid@redhat.com>2014-02-12 02:44:09 +0000
committerVijay Bellur <vbellur@redhat.com>2014-02-12 21:49:43 -0800
commit43f71899c4533ef6e160c7a8fb8c62bf0e6c3bba (patch)
tree295a059015aff66bd1045e5b7cc4317b068e6810 /xlators
parentfbcae0d20a409bccd8fc4daeceac010fab66d0a0 (diff)
cluster/stripe: Fix the possible resource leaks.
Change-Id: Ic6fbc8c843f80edd7458d15229eb72a5609973a5 BUG: 789278 Signed-off-by: Poornima <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/6986 Reviewed-by: Amar Tumballi <amarts@gmail.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/stripe/src/stripe.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/xlators/cluster/stripe/src/stripe.c b/xlators/cluster/stripe/src/stripe.c
index c736e83ed..32d53e8e6 100644
--- a/xlators/cluster/stripe/src/stripe.c
+++ b/xlators/cluster/stripe/src/stripe.c
@@ -1053,6 +1053,9 @@ stripe_rename (call_frame_t *frame, xlator_t *this, loc_t *oldloc,
op_errno = ENOMEM;
goto err;
}
+
+ frame->local = local;
+
local->op_ret = -1;
loc_copy (&local->loc, oldloc);
loc_copy (&local->loc2, newloc);
@@ -1066,8 +1069,6 @@ stripe_rename (call_frame_t *frame, xlator_t *this, loc_t *oldloc,
local->fctx = fctx;
}
- frame->local = local;
-
STACK_WIND (frame, stripe_first_rename_cbk, trav->xlator,
trav->xlator->fops->rename, oldloc, newloc, NULL);
@@ -2879,15 +2880,15 @@ stripe_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t flags, dict
goto err;
}
+ frame->local = local;
+
inode_ctx_get(fd->inode, this, (uint64_t *) &fctx);
if (!fctx) {
op_errno = EINVAL;
goto err;
}
local->fctx = fctx;
-
local->op_ret = -1;
- frame->local = local;
local->call_count = priv->child_count;
while (trav) {