summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2015-03-09 19:35:14 +0530
committerVijay Bellur <vbellur@redhat.com>2015-03-09 10:52:10 -0700
commit8612553ffe3d87481c70911a9b8491fb5f4139b5 (patch)
tree9cfc7abf9f78649c7b6339ee36f1acacd0018e77 /xlators/storage/posix
parent83eab209d82c92a2676d1f794d5d24af0ac5bbab (diff)
Fix dictionary leaks in ancestry-building code.
Change-Id: I7a4a24ed95f897d1c14d89f3869c20ba40f85b7f BUG: 1188636 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/9839 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/storage/posix')
-rw-r--r--xlators/storage/posix/src/posix-helpers.c2
-rw-r--r--xlators/storage/posix/src/posix.c5
2 files changed, 1 insertions, 6 deletions
diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c
index 2920f31..ea469bf 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 8ac3c5d..ccd441a 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;