diff options
author | Bhumika Goyal <bgoyal@redhat.com> | 2018-08-19 01:38:53 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-08-22 06:45:43 +0000 |
commit | 0ebaa9c66347a78c3dce649e833143832114343a (patch) | |
tree | de993bd86a00f2f933c62ebfa4570542245a0491 /xlators/protocol/client | |
parent | 0f86ed9f8be0666bb49252daa24b2db6aa174199 (diff) |
protocol: coverity fixes
Fixes CID: 1389388 1389320 1274113 1388881 1388623 1124801 1124795
Change-Id: Ia72abc0560c959b0298f42e25abdfc5523755569
updates: bz#789278
Signed-off-by: Bhumika Goyal <bgoyal@redhat.com>
Diffstat (limited to 'xlators/protocol/client')
-rw-r--r-- | xlators/protocol/client/src/client-helpers.c | 6 | ||||
-rw-r--r-- | xlators/protocol/client/src/client-rpc-fops_v2.c | 6 |
2 files changed, 4 insertions, 8 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; diff --git a/xlators/protocol/client/src/client-rpc-fops_v2.c b/xlators/protocol/client/src/client-rpc-fops_v2.c index dc5b8d4ac83..6dd3a916f6a 100644 --- a/xlators/protocol/client/src/client-rpc-fops_v2.c +++ b/xlators/protocol/client/src/client-rpc-fops_v2.c @@ -803,9 +803,6 @@ client4_0_setxattr_cbk (struct rpc_req *req, struct iovec *iov, int count, } xdr_to_dict (&rsp.xdata, &xdata); - if (ret < 0) - goto out; - out: op_errno = gf_error_to_errno (rsp.op_errno); if (rsp.op_ret == -1) { @@ -3724,9 +3721,6 @@ unwind: if (rsp_iobuf) iobuf_unref (rsp_iobuf); - if (rsp_iobref) - iobref_unref (rsp_iobref); - CLIENT_STACK_UNWIND (readv, frame, -1, op_errno, NULL, 0, NULL, NULL, NULL); GF_FREE (req.xdata.pairs.pairs_val); |