path: root/xlators
diff options
authorBrian Foster <>2012-04-12 15:46:37 -0400
committerAnand Avati <>2012-04-12 14:21:39 -0700
commit918678dc8e5a8cac1ec2dea7f8d2b11a186f38eb (patch)
treede469586e1dc97cbd0a3bfefe54cce466b23f465 /xlators
parent6a995ab3300a5ee0ee79a4d7d75281a79deec96e (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 <> Reviewed-on: Tested-by: Gluster Build System <> Reviewed-by: Anand Avati <>
Diffstat (limited to 'xlators')
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 dd161ce..9ef599a 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)
dict_copy (dict, mdc->xattr);
- mdc->xattr = dict_ref (dict);
time (&mdc->xa_time);
UNLOCK (&mdc->lock);