protocol/client: Fix potential mem-leaks
Commit 93eaeb9c93be3232f24e840044d560f9f0e66f71 introduces leaks in INODELK callback where a dict is unserialized twice, leading to dict leaks. Change-Id: I219ccb2279f237ebc2e4fc366af4775a461929b8 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/16156 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
This commit is contained in:
parent
d2dff6320a
commit
2d87431c51
@ -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;
|
||||
}
|
||||
|
@ -1531,10 +1531,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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user