summaryrefslogtreecommitdiffstats
path: root/xlators/features/index
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/index')
-rw-r--r--xlators/features/index/src/index.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/xlators/features/index/src/index.c b/xlators/features/index/src/index.c
index 12f98974fc3..619de37c13b 100644
--- a/xlators/features/index/src/index.c
+++ b/xlators/features/index/src/index.c
@@ -2239,15 +2239,24 @@ index_make_xattrop_watchlist (xlator_t *this, index_priv_t *priv,
switch (type) {
case DIRTY:
- priv->dirty_watchlist = xattrs;
+ priv->dirty_watchlist = dict_copy_with_ref (xattrs,
+ priv->dirty_watchlist);
+ if (!priv->dirty_watchlist) {
+ ret = -1;
+ goto out;
+ }
break;
case XATTROP:
- priv->pending_watchlist = xattrs;
+ priv->pending_watchlist = dict_copy_with_ref (xattrs,
+ priv->pending_watchlist);
+ if (!priv->pending_watchlist) {
+ ret = -1;
+ goto out;
+ }
break;
default:
break;
}
- xattrs = NULL;
ret = 0;
out: