From 8612553ffe3d87481c70911a9b8491fb5f4139b5 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Mon, 9 Mar 2015 19:35:14 +0530 Subject: Fix dictionary leaks in ancestry-building code. Change-Id: I7a4a24ed95f897d1c14d89f3869c20ba40f85b7f BUG: 1188636 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/9839 Tested-by: Gluster Build System Reviewed-by: Vijaikumar Mallikarjuna Reviewed-by: Vijay Bellur --- xlators/storage/posix/src/posix-helpers.c | 2 +- xlators/storage/posix/src/posix.c | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) (limited to 'xlators/storage/posix') diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c index 2920f318709..ea469bf6109 100644 --- a/xlators/storage/posix/src/posix-helpers.c +++ b/xlators/storage/posix/src/posix-helpers.c @@ -641,7 +641,7 @@ posix_lookup_xattr_fill (xlator_t *this, const char *real_path, loc_t *loc, list = _gf_true; } - xattr = get_new_dict(); + xattr = dict_new (); if (!xattr) { goto out; } diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index 8ac3c5d4b68..ccd441a2d62 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -199,9 +199,6 @@ parent: op_ret = entry_ret; out: - if (xattr) - dict_ref (xattr); - if (!op_ret && !gfidless && uuid_is_null (buf.ia_gfid)) { gf_log (this->name, GF_LOG_ERROR, "buf->ia_gfid is null for " "%s", (real_path) ? real_path: ""); @@ -5210,8 +5207,6 @@ posix_readdirp_fill (xlator_t *this, fd_t *fd, gf_dirent_t *entries, dict_t *dic posix_entry_xattr_fill (this, entry->inode, fd, entry->d_name, dict, &stbuf); - if (entry->dict) - dict_ref (entry->dict); } entry->d_stat = stbuf; -- cgit