summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorKrutika Dhananjay <kdhananj@redhat.com>2016-12-16 09:31:41 +0530
committerRaghavendra G <rgowdapp@redhat.com>2016-12-20 22:55:03 -0800
commit5bc916bab68bbb1fe7eac4ffaca5b1e3951cc5ad (patch)
tree89e9ea9facc705a3f47314a1c8e81fdf86149c79 /xlators
parent63152c4037218ca9b89282547d6fe38399fb111a (diff)
protocol/client: Fix potential mem-leaks
Backport of: http://review.gluster.org/16156 Commit 93eaeb9c93be3232f24e840044d560f9f0e66f71 introduces leaks in INODELK callback where a dict is unserialized twice, leading to dict leaks. Change-Id: Ib01e7fd3557b59ebb748114195b234b9397bb137 BUG: 1405885 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/16186 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/protocol/client/src/client-handshake.c1
-rw-r--r--xlators/protocol/client/src/client-rpc-fops.c4
2 files changed, 1 insertions, 4 deletions
diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c
index 3284facb893..dc6e244e717 100644
--- a/xlators/protocol/client/src/client-handshake.c
+++ b/xlators/protocol/client/src/client-handshake.c
@@ -86,6 +86,7 @@ out:
/* Don't use 'GF_FREE', this is allocated by libc */
free (rsp.spec);
+ free (rsp.xdata.xdata_val);
return 0;
}
diff --git a/xlators/protocol/client/src/client-rpc-fops.c b/xlators/protocol/client/src/client-rpc-fops.c
index e289086d326..a3acdb3b925 100644
--- a/xlators/protocol/client/src/client-rpc-fops.c
+++ b/xlators/protocol/client/src/client-rpc-fops.c
@@ -1535,10 +1535,6 @@ client3_3_inodelk_cbk (struct rpc_req *req, struct iovec *iov, int count,
goto out;
}
- GF_PROTOCOL_DICT_UNSERIALIZE (this, xdata, (rsp.xdata.xdata_val),
- (rsp.xdata.xdata_len), ret,
- rsp.op_errno, out);
-
ret = client_post_inodelk (this, &rsp, &xdata);
if (ret < 0)
goto out;