summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSoumya Koduri <skoduri@redhat.com>2016-01-13 11:34:27 +0530
committerNiels de Vos <ndevos@redhat.com>2016-01-24 09:13:08 -0800
commitb313b72ab0bf1fbc92b8b201ea4154ce5fd73c88 (patch)
tree2ddf7c72c03bf531e01e9930e3c237cbd39dc437
parente72a77a9eb86b51f0985db6091bedc8606e0a5eb (diff)
upcall: free the xdr* allocations
Free the xdr string allocations after decoding the upcall cache_invalidation request. This is backport of the below fix - http://review.gluster.org/13232 Change-Id: I0ffc64f587d6c8566cba76cf08148f937a735926 BUG: 1300924 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/13232 Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/13277 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
-rw-r--r--xlators/protocol/client/src/client-callback.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/protocol/client/src/client-callback.c b/xlators/protocol/client/src/client-callback.c
index d36a64b076e..3577330a223 100644
--- a/xlators/protocol/client/src/client-callback.c
+++ b/xlators/protocol/client/src/client-callback.c
@@ -77,6 +77,12 @@ client_cbk_cache_invalidation (struct rpc_clnt *rpc, void *mydata, void *data)
default_notify (THIS, GF_EVENT_UPCALL, &upcall_data);
out:
+ if (ca_req.gfid)
+ free (ca_req.gfid);
+
+ if (ca_req.xdata.xdata_val)
+ free (ca_req.xdata.xdata_val);
+
return 0;
}