From a96375c180901756753246cb00b42f44fd8b4fd7 Mon Sep 17 00:00:00 2001 From: Anuradha Date: Tue, 30 Dec 2014 18:54:33 +0530 Subject: afr: Fixes to commit 85427a23c238499137cbfaafdb7b6ad27f67506a * Fixed a dict leak * Re-added 'return on failure' check Change-Id: I07edd03e4608fd2b7c4a91019a0e43033e6e78b2 BUG: 1163804 Signed-off-by: Anuradha Reviewed-on: http://review.gluster.org/9368 Tested-by: Gluster Build System Reviewed-by: Pranith Kumar Karampuri Tested-by: Pranith Kumar Karampuri --- heal/src/glfs-heal.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'heal/src/glfs-heal.c') diff --git a/heal/src/glfs-heal.c b/heal/src/glfs-heal.c index f1249ec6670..c52a46bd709 100644 --- a/heal/src/glfs-heal.c +++ b/heal/src/glfs-heal.c @@ -206,6 +206,10 @@ glfsh_process_entries (xlator_t *xl, fd_t *fd, gf_dirent_t *entries, (strcmp (entry->d_name, "..") == 0)) continue; + if (dict) { + dict_unref (dict); + dict = NULL; + } uuid_clear (gfid); GF_FREE (path); path = NULL; @@ -229,6 +233,10 @@ glfsh_process_entries (xlator_t *xl, fd_t *fd, gf_dirent_t *entries, } ret = 0; GF_FREE (path); + if (dict) { + dict_unref (dict); + dict = NULL; + } return ret; } -- cgit