summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-self-heal-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-common.c')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-common.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c
index edacdde568d..a7633c92094 100644
--- a/xlators/cluster/afr/src/afr-self-heal-common.c
+++ b/xlators/cluster/afr/src/afr-self-heal-common.c
@@ -81,8 +81,10 @@ afr_selfheal_output_xattr (xlator_t *this, afr_transaction_type type,
raw[idx] = hton32 (output_dirty[subvol]);
ret = dict_set_bin (xattr, AFR_DIRTY, raw,
sizeof(int) * AFR_NUM_CHANGE_LOGS);
- if (ret)
+ if (ret) {
+ GF_FREE (raw);
goto err;
+ }
/* clear/set pending */
for (j = 0; j < priv->child_count; j++) {
@@ -95,8 +97,10 @@ afr_selfheal_output_xattr (xlator_t *this, afr_transaction_type type,
ret = dict_set_bin (xattr, priv->pending_key[j],
raw, sizeof(int) * AFR_NUM_CHANGE_LOGS);
- if (ret)
+ if (ret) {
+ GF_FREE (raw);
goto err;
+ }
}
return xattr;