summaryrefslogtreecommitdiffstats
path: root/glusterfsd/src
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 /glusterfsd/src
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 'glusterfsd/src')
-rw-r--r--glusterfsd/src/glusterfsd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
index c980e7bc640..4edb5894c60 100644
--- a/glusterfsd/src/glusterfsd.c
+++ b/glusterfsd/src/glusterfsd.c
@@ -2196,14 +2196,12 @@ glusterfs_process_volfp (glusterfs_ctx_t *ctx, FILE *fp)
ret = glusterfs_graph_prepare (graph, ctx);
if (ret) {
- glusterfs_graph_destroy (graph);
goto out;
}
ret = glusterfs_graph_activate (graph, ctx);
if (ret) {
- glusterfs_graph_destroy (graph);
goto out;
}
@@ -2215,6 +2213,7 @@ out:
fclose (fp);
if (ret && !ctx->active) {
+ glusterfs_graph_destroy (graph);
/* there is some error in setting up the first graph itself */
cleanup_and_exit (0);
}