summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/afr/src')
-rw-r--r--xlators/cluster/afr/src/afr-inode-read.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/xlators/cluster/afr/src/afr-inode-read.c b/xlators/cluster/afr/src/afr-inode-read.c
index 6c837c3371e..41ffcb9138a 100644
--- a/xlators/cluster/afr/src/afr-inode-read.c
+++ b/xlators/cluster/afr/src/afr-inode-read.c
@@ -656,6 +656,8 @@ afr_getxattr_clrlk_cbk (call_frame_t *frame, void *cookie,
LOCK (&frame->lock);
{
callcnt = --local->call_count;
+ if (op_ret == -1)
+ local->child_errno[cky] = op_errno;
if (!local->dict)
local->dict = dict_new ();
@@ -664,14 +666,12 @@ afr_getxattr_clrlk_cbk (call_frame_t *frame, void *cookie,
&tmp_report);
if (ret)
goto unlock;
- ret = dict_set_str (local->dict,
- children[cky]->name,
- tmp_report);
+ ret = dict_set_dynstr (local->dict,
+ children[cky]->name,
+ gf_strdup (tmp_report));
if (ret)
goto unlock;
}
- if (op_ret == -1)
- local->child_errno[cky] = op_errno;
}
unlock:
UNLOCK (&frame->lock);