diff options
author | Brian Foster <bfoster@redhat.com> | 2012-04-12 15:46:37 -0400 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-04-12 14:21:39 -0700 |
commit | 918678dc8e5a8cac1ec2dea7f8d2b11a186f38eb (patch) | |
tree | de469586e1dc97cbd0a3bfefe54cce466b23f465 | |
parent | 6a995ab3300a5ee0ee79a4d7d75281a79deec96e (diff) |
md-cache: fix dict memory leak in mdc_inode_xatt_update
We currently either dict_ref() or dict_copy() into mdc->xattr.
The double dict_ref() call path is obvious. Alternatively,
dict_copy() does not ref the dict in the situation where it
creates a new dict, but we only call dict_copy() in this
context when we already have a dict, which should mean the
extra ref is unnecessary.
BUG: 801582
Change-Id: I72e3f1a16f942f04752c033812d13d50ee7c2c2c
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-on: http://review.gluster.com/3138
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
-rw-r--r-- | xlators/performance/md-cache/src/md-cache.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/xlators/performance/md-cache/src/md-cache.c b/xlators/performance/md-cache/src/md-cache.c index dd161ce84..9ef599ad8 100644 --- a/xlators/performance/md-cache/src/md-cache.c +++ b/xlators/performance/md-cache/src/md-cache.c @@ -491,8 +491,6 @@ mdc_inode_xatt_update (xlator_t *this, inode_t *inode, dict_t *dict) else dict_copy (dict, mdc->xattr); - mdc->xattr = dict_ref (dict); - time (&mdc->xa_time); } UNLOCK (&mdc->lock); |