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
committerJeff Darcy <jdarcy@redhat.com>2016-02-23 20:19:05 -0800
commite38bf1bdeda3c7a89be3193ad62a72b9139358dd (patch)
tree76bbbb4d708c3947f05434cfd7a91651cede960b /xlators/mgmt/glusterd/src/glusterd-store.c
parent8cf29a4207c162be8e2993ae36f49090851cbbfc (diff)
glusterd: fixing few memory leak in glusterd
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 meory upon exit. Fix is to free the memory after exit of the above function. Thanx 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>
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 5f04f7cdffd..c17a2e10a83 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
@@ -4001,7 +4001,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;
@@ -4084,7 +4083,6 @@ glusterd_store_retrieve_peers (xlator_t *this)
&op_errno);
}
if (op_errno != GD_STORE_EOF) {
- GF_FREE(hostname);
goto out;
}