|
|
7c2869 |
From 9a3f1f2d4348e50919cd2cbb109ef1c7f7372c43 Mon Sep 17 00:00:00 2001
|
|
|
7c2869 |
From: Vijay Bellur <vbellur@redhat.com>
|
|
|
7c2869 |
Date: Tue, 4 Oct 2016 13:55:53 -0400
|
|
|
7c2869 |
Subject: [PATCH 633/642] mgmt/glusterd: Cleanup memory leaks in handshake
|
|
|
7c2869 |
|
|
|
7c2869 |
Thanks to bingxuan.zhang at nokia dot com for the report and patch.
|
|
|
7c2869 |
|
|
|
7c2869 |
> Change-Id: I994f82493fec7827f31592340af5bda83322f878
|
|
|
7c2869 |
> BUG: 1377584
|
|
|
7c2869 |
> Signed-off-by: Vijay Bellur <vbellur@redhat.com>
|
|
|
7c2869 |
> Reviewed-on: http://review.gluster.org/15612
|
|
|
7c2869 |
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
|
|
|
7c2869 |
> Smoke: Gluster Build System <jenkins@build.gluster.org>
|
|
|
7c2869 |
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
|
|
|
7c2869 |
> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
7c2869 |
> (cherry pick from commit f0c588e5e6fa1552325a31e0e01704ecf063c7e1)
|
|
|
7c2869 |
|
|
|
7c2869 |
BUG: 1526363
|
|
|
7c2869 |
Change-Id: I994f82493fec7827f31592340af5bda83322f878
|
|
|
7c2869 |
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
|
|
|
7c2869 |
Reviewed-on: https://code.engineering.redhat.com/gerrit/125953
|
|
|
7c2869 |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
7c2869 |
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
7c2869 |
---
|
|
|
7c2869 |
xlators/mgmt/glusterd/src/glusterd-handshake.c | 6 ++++++
|
|
|
7c2869 |
1 file changed, 6 insertions(+)
|
|
|
7c2869 |
|
|
|
7c2869 |
diff --git a/xlators/mgmt/glusterd/src/glusterd-handshake.c b/xlators/mgmt/glusterd/src/glusterd-handshake.c
|
|
|
7c2869 |
index a09437e..652c868 100644
|
|
|
7c2869 |
--- a/xlators/mgmt/glusterd/src/glusterd-handshake.c
|
|
|
7c2869 |
+++ b/xlators/mgmt/glusterd/src/glusterd-handshake.c
|
|
|
7c2869 |
@@ -476,6 +476,10 @@ out:
|
|
|
7c2869 |
peerinfo->max_op_version = client_max_op_version;
|
|
|
7c2869 |
peerinfo->min_op_version = client_min_op_version;
|
|
|
7c2869 |
|
|
|
7c2869 |
+ if (dict)
|
|
|
7c2869 |
+ dict_unref (dict);
|
|
|
7c2869 |
+
|
|
|
7c2869 |
+
|
|
|
7c2869 |
return ret;
|
|
|
7c2869 |
}
|
|
|
7c2869 |
|
|
|
7c2869 |
@@ -930,6 +934,8 @@ fail:
|
|
|
7c2869 |
(xdrproc_t)xdr_gf_getspec_rsp);
|
|
|
7c2869 |
free (args.key);//malloced by xdr
|
|
|
7c2869 |
free (rsp.spec);
|
|
|
7c2869 |
+ if (args.xdata.xdata_val)
|
|
|
7c2869 |
+ free (args.xdata.xdata_val);
|
|
|
7c2869 |
|
|
|
7c2869 |
return 0;
|
|
|
7c2869 |
}
|
|
|
7c2869 |
--
|
|
|
7c2869 |
2.9.3
|
|
|
7c2869 |
|