summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client/src/client-helpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/protocol/client/src/client-helpers.c')
-rw-r--r--xlators/protocol/client/src/client-helpers.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/protocol/client/src/client-helpers.c b/xlators/protocol/client/src/client-helpers.c
index ddb88795fee..f077fc2a73c 100644
--- a/xlators/protocol/client/src/client-helpers.c
+++ b/xlators/protocol/client/src/client-helpers.c
@@ -247,6 +247,8 @@ unserialize_rsp_direntp (xlator_t *this, fd_t *fd,
ret = 0;
out:
+ if (buf)
+ GF_FREE (buf);
return ret;
}
@@ -474,13 +476,13 @@ client_fd_fop_prepare_local (call_frame_t *frame, fd_t *fd, int64_t remote_fd)
clnt_local_t *local = NULL;
int ret = 0;
- this = frame->this;
-
if (!frame || !fd) {
ret = -EINVAL;
goto out;
}
+ this = frame->this;
+
frame->local = mem_get0 (this->local_pool);
if (frame->local == NULL) {
ret = -ENOMEM;