summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorVijay Bellur <vbellur@redhat.com>2016-10-04 13:55:53 -0400
committerAtin Mukherjee <amukherj@redhat.com>2016-10-11 23:28:30 -0700
commitf0c588e5e6fa1552325a31e0e01704ecf063c7e1 (patch)
tree64cb6b7b8a512a31189671b5288f416934c935f7 /xlators
parentb77cf4d021f26eb3fda81abec10464594324fac2 (diff)
mgmt/glusterd: Cleanup memory leaks in handshake
Thanks to bingxuan.zhang at nokia dot com for the report and patch. Change-Id: I994f82493fec7827f31592340af5bda83322f878 BUG: 1377584 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/15612 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handshake.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handshake.c b/xlators/mgmt/glusterd/src/glusterd-handshake.c
index 5bda501ab3d..6471a9537ba 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handshake.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handshake.c
@@ -476,6 +476,10 @@ out:
peerinfo->max_op_version = client_max_op_version;
peerinfo->min_op_version = client_min_op_version;
+ if (dict)
+ dict_unref (dict);
+
+
return ret;
}
@@ -929,6 +933,8 @@ fail:
(xdrproc_t)xdr_gf_getspec_rsp);
free (args.key);//malloced by xdr
free (rsp.spec);
+ if (args.xdata.xdata_val)
+ free (args.xdata.xdata_val);
return 0;
}