diff options
-rw-r--r-- | xlators/cluster/afr/src/afr-common.c | 3 | ||||
-rw-r--r-- | xlators/cluster/afr/src/afr-inode-read.c | 12 |
2 files changed, 5 insertions, 10 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index 4eafed342..31854b138 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -841,6 +841,9 @@ afr_local_cleanup (afr_local_t *local, xlator_t *this) if (local->xattr_req) dict_unref (local->xattr_req); + if (local->dict) + dict_unref (local->dict); + if (local->child_up) GF_FREE (local->child_up); diff --git a/xlators/cluster/afr/src/afr-inode-read.c b/xlators/cluster/afr/src/afr-inode-read.c index c46192702..6c837c337 100644 --- a/xlators/cluster/afr/src/afr-inode-read.c +++ b/xlators/cluster/afr/src/afr-inode-read.c @@ -713,12 +713,6 @@ unlock: priv->child_count); AFR_STACK_UNWIND (getxattr, frame, op_ret, op_errno, xattr); - if (local->dict) - dict_unref (local->dict); - - if (local->child_errno) - GF_FREE (local->child_errno); - if (xattr) dict_unref (xattr); } @@ -879,9 +873,6 @@ afr_getxattr_pathinfo_cbk (call_frame_t *frame, void *cookie, unwind: AFR_STACK_UNWIND (getxattr, frame, op_ret, op_errno, nxattr); - if (local->dict) - dict_unref (local->dict); - if (nxattr) dict_unref (nxattr); } @@ -903,7 +894,8 @@ afr_is_special_xattr (const char *name, fop_getxattr_cbk_t *cbk) if (!strcmp (name, GF_XATTR_PATHINFO_KEY)) *cbk = afr_getxattr_pathinfo_cbk; - else if (!strcmp (name, GF_XATTR_CLRLK_CMD)) + else if (!strncmp (name, GF_XATTR_CLRLK_CMD, + strlen (GF_XATTR_CLRLK_CMD))) *cbk = afr_getxattr_clrlk_cbk; else is_spl = _gf_false; |