summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec/src/ec-heal.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/ec/src/ec-heal.c')
-rw-r--r--xlators/cluster/ec/src/ec-heal.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/xlators/cluster/ec/src/ec-heal.c b/xlators/cluster/ec/src/ec-heal.c
index d4beabf0682..7d4bed1b185 100644
--- a/xlators/cluster/ec/src/ec-heal.c
+++ b/xlators/cluster/ec/src/ec-heal.c
@@ -525,11 +525,13 @@ ec_adjust_versions (call_frame_t *frame, ec_t *ec, ec_txn_t type,
out:
/* Cleanup */
- for (i = 0; i < ec->nodes; i++) {
- if (xattr[i])
- dict_unref (xattr[i]);
+ if (xattr) {
+ for (i = 0; i < ec->nodes; i++) {
+ if (xattr[i])
+ dict_unref (xattr[i]);
+ }
+ GF_FREE (xattr);
}
- GF_FREE (xattr);
cluster_replies_wipe (replies, ec->nodes);
loc_wipe (&loc);
return op_ret;