summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-store.c
diff options
context:
space:
mode:
authorGaurav Kumar Garg <garg.gaurav52@gmail.com>2015-12-09 20:12:17 +0530
committerVijay Bellur <vbellur@redhat.com>2016-03-10 07:20:04 -0800
commitaf7428490253421484e61409ddb77b653c4a5e63 (patch)
tree20c1515d7d2ed917fb31c403a04e72c78a59e6c2 /xlators/mgmt/glusterd/src/glusterd-store.c
parenta8a8feb25216db2fa426b09d778f61c0f89d514c (diff)
glusterd: fixing few memory leak in glusterd
This patch is backport of: http://review.gluster.org/#/c/12927/ Current glusterd code base having memory leak. This is because of memory allocate by dict_allocate_and_serialize function in "gd_syncop_mgmt_v3_lock" and "gd_syncop_mgmt_v3_unlock" function is not freeing up memory upon exit. Fix is to free the memory after exit of the above function. Thanks Carlos and Roman for finding out the issue and fix. >> Change-Id: Id67aa794c84969830ca7ea8c2374f80c64d7a639 >> BUG: 1287517 >> Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> >> Signed-off-by: Carlos Chinea <carlos.chinea@nokia.com> >> Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com> >> Reviewed-on: http://review.gluster.org/12927 >> 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> >> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Change-Id: Id67aa794c84969830ca7ea8c2374f80c64d7a639 BUG: 1311377 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> (cherry picked from commit e38bf1bdeda3c7a89be3193ad62a72b9139358dd) Reviewed-on: http://review.gluster.org/13503 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-store.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-store.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
index b2247423619..361ecb88554 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
@@ -4024,7 +4024,6 @@ glusterd_store_retrieve_peers (xlator_t *this)
struct dirent *entry = NULL;
char path[PATH_MAX] = {0,};
glusterd_peerinfo_t *peerinfo = NULL;
- char *hostname = NULL;
gf_store_handle_t *shandle = NULL;
char filepath[PATH_MAX] = {0,};
gf_store_iter_t *iter = NULL;
@@ -4107,7 +4106,6 @@ glusterd_store_retrieve_peers (xlator_t *this)
&op_errno);
}
if (op_errno != GD_STORE_EOF) {
- GF_FREE(hostname);
goto out;
}