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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/cluster/ec/src/ec-heal.c b/xlators/cluster/ec/src/ec-heal.c
index 6b4c45fa370..c16b9c5c4fe 100644
--- a/xlators/cluster/ec/src/ec-heal.c
+++ b/xlators/cluster/ec/src/ec-heal.c
@@ -339,9 +339,13 @@ ec_char_array_to_mask (unsigned char *array, int numsubvols)
int i = 0;
uintptr_t mask = 0;
+ if (array == NULL)
+ goto out;
+
for (i = 0; i < numsubvols; i++)
if (array[i])
mask |= (1ULL<<i);
+out:
return mask;
}