summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client
diff options
context:
space:
mode:
authorPoornima <pgurusid@redhat.com>2014-02-12 03:18:43 +0000
committerVijay Bellur <vbellur@redhat.com>2014-02-15 01:18:35 -0800
commit1ad41c4ca167e4600f163408c1f859d55cdbdc07 (patch)
tree8b82156b121aaee82b152f18a649c7bfd4b1946e /xlators/protocol/client
parent5fb60ca150efbf9072dd7b2de13362c8cc4daa1b (diff)
protocol/client: Fix the possible resource leaks.
Change-Id: Ib86dee366f5a6f0971c6472d1fb2c32dbf7f0102 BUG: 789278 Signed-off-by: Poornima <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/6985 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/protocol/client')
-rw-r--r--xlators/protocol/client/src/client-rpc-fops.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/xlators/protocol/client/src/client-rpc-fops.c b/xlators/protocol/client/src/client-rpc-fops.c
index 01590d73afc..99a6f6d7492 100644
--- a/xlators/protocol/client/src/client-rpc-fops.c
+++ b/xlators/protocol/client/src/client-rpc-fops.c
@@ -3068,13 +3068,13 @@ client3_3_lookup (call_frame_t *frame, xlator_t *this,
op_errno = ENOMEM;
goto unwind;
}
+ frame->local = local;
if (!(args->loc && args->loc->inode))
goto unwind;
loc_copy (&local->loc, args->loc);
loc_path (&local->loc, NULL);
- frame->local = local;
if (args->loc->parent) {
if (!uuid_is_null (args->loc->parent->gfid))
@@ -3792,13 +3792,13 @@ client3_3_mknod (call_frame_t *frame, xlator_t *this,
op_errno = ENOMEM;
goto unwind;
}
+ frame->local = local;
if (!(args->loc && args->loc->parent))
goto unwind;
loc_copy (&local->loc, args->loc);
loc_path (&local->loc, NULL);
- frame->local = local;
if (!uuid_is_null (args->loc->parent->gfid))
memcpy (req.pargfid, args->loc->parent->gfid, 16);
@@ -3860,13 +3860,13 @@ client3_3_mkdir (call_frame_t *frame, xlator_t *this,
op_errno = ENOMEM;
goto unwind;
}
+ frame->local = local;
if (!(args->loc && args->loc->parent))
goto unwind;
loc_copy (&local->loc, args->loc);
loc_path (&local->loc, NULL);
- frame->local = local;
if (!uuid_is_null (args->loc->parent->gfid))
memcpy (req.pargfid, args->loc->parent->gfid, 16);
@@ -3927,6 +3927,8 @@ client3_3_create (call_frame_t *frame, xlator_t *this,
op_errno = ENOMEM;
goto unwind;
}
+ frame->local = local;
+
if (!(args->loc && args->loc->parent))
goto unwind;
@@ -3935,7 +3937,6 @@ client3_3_create (call_frame_t *frame, xlator_t *this,
loc_copy (&local->loc, args->loc);
loc_path (&local->loc, NULL);
- frame->local = local;
if (!uuid_is_null (args->loc->parent->gfid))
memcpy (req.pargfid, args->loc->parent->gfid, 16);
@@ -3998,6 +3999,8 @@ client3_3_open (call_frame_t *frame, xlator_t *this,
op_errno = ENOMEM;
goto unwind;
}
+ frame->local = local;
+
if (!(args->loc && args->loc->inode))
goto unwind;
@@ -4005,7 +4008,6 @@ client3_3_open (call_frame_t *frame, xlator_t *this,
local->flags = args->flags;
loc_copy (&local->loc, args->loc);
loc_path (&local->loc, NULL);
- frame->local = local;
if (!uuid_is_null (args->loc->inode->gfid))
memcpy (req.gfid, args->loc->inode->gfid, 16);
@@ -4388,13 +4390,14 @@ client3_3_opendir (call_frame_t *frame, xlator_t *this,
op_errno = ENOMEM;
goto unwind;
}
+ frame->local = local;
+
if (!(args->loc && args->loc->inode))
goto unwind;
local->fd = fd_ref (args->fd);
loc_copy (&local->loc, args->loc);
loc_path (&local->loc, NULL);
- frame->local = local;
if (!uuid_is_null (args->loc->inode->gfid))
memcpy (req.gfid, args->loc->inode->gfid, 16);
@@ -5251,6 +5254,7 @@ client3_3_lk (call_frame_t *frame, xlator_t *this,
op_errno = ENOMEM;
goto unwind;
}
+ frame->local = local;
CLIENT_GET_REMOTE_FD (this, args->fd, DEFAULT_REMOTE_FD,
remote_fd, op_errno, unwind);
@@ -5278,7 +5282,6 @@ client3_3_lk (call_frame_t *frame, xlator_t *this,
local->owner = frame->root->lk_owner;
local->cmd = args->cmd;
local->fd = fd_ref (args->fd);
- frame->local = local;
req.fd = remote_fd;
req.cmd = gf_cmd;