From 211521f039bb5c883ef444577b5962bad9e18be1 Mon Sep 17 00:00:00 2001 From: Mohit Agrawal Date: Fri, 30 Nov 2018 16:07:39 +0530 Subject: core: Resolve dict_leak at the time of destroying graph Problem: In gluster code some of the places it call's get_new_dict to create a dictionary without taking reference so at the time of dict_unref it has become a leak Solution: To resolve the same call dict_new instead of get_new_dict updates bz#1650403 Change-Id: I3ccbbf5af07079a4fa09aad2cd0458c8625b2f06 Signed-off-by: Mohit Agrawal --- glusterfsd/src/glusterfsd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'glusterfsd/src/glusterfsd.c') diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c index 42731660485..df5b9ed0b31 100644 --- a/glusterfsd/src/glusterfsd.c +++ b/glusterfsd/src/glusterfsd.c @@ -725,7 +725,7 @@ create_fuse_mount(glusterfs_ctx_t *ctx) } master->ctx = ctx; - master->options = get_new_dict(); + master->options = dict_new(); if (!master->options) goto err; @@ -2644,7 +2644,6 @@ out: /* Take dict ref for every graph xlator to avoid dict leak at the time of graph destroying */ - gluster_graph_take_reference(graph->first); glusterfs_graph_fini(graph); glusterfs_graph_destroy(graph); } -- cgit