From 43f71899c4533ef6e160c7a8fb8c62bf0e6c3bba Mon Sep 17 00:00:00 2001 From: Poornima Date: Wed, 12 Feb 2014 02:44:09 +0000 Subject: cluster/stripe: Fix the possible resource leaks. Change-Id: Ic6fbc8c843f80edd7458d15229eb72a5609973a5 BUG: 789278 Signed-off-by: Poornima Reviewed-on: http://review.gluster.org/6986 Reviewed-by: Amar Tumballi Tested-by: Gluster Build System --- xlators/cluster/stripe/src/stripe.c | 9 +++++---- 1 file 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) { -- cgit