summaryrefslogtreecommitdiffstats
path: root/glusterfsd/src
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 /glusterfsd/src
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 '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 45dbc26801a..ef4b81c65f5 100644
--- a/glusterfsd/src/glusterfsd.c
+++ b/glusterfsd/src/glusterfsd.c
@@ -2199,14 +2199,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;
}
@@ -2218,6 +2216,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);
}