summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/stripe/src
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/stripe/src')
-rw-r--r--xlators/cluster/stripe/src/stripe-helpers.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/xlators/cluster/stripe/src/stripe-helpers.c b/xlators/cluster/stripe/src/stripe-helpers.c
index a2ebc1201..1821832c2 100644
--- a/xlators/cluster/stripe/src/stripe-helpers.c
+++ b/xlators/cluster/stripe/src/stripe-helpers.c
@@ -471,12 +471,16 @@ set_stripe_block_size (xlator_t *this, stripe_private_t *priv, char *data)
temp_stripeopt = NULL;
else
temp_stripeopt = priv->pattern;
- priv->pattern = stripe_opt;
+
stripe_opt->next = temp_stripeopt;
- stripe_str = strtok_r (NULL, ",", &tmp_str);
+ priv->pattern = stripe_opt;
+ stripe_opt = NULL;
+
GF_FREE (dup_str);
dup_str = NULL;
+
+ stripe_str = strtok_r (NULL, ",", &tmp_str);
}
ret = 0;
@@ -485,6 +489,9 @@ out:
if (dup_str)
GF_FREE (dup_str);
+ if (stripe_opt)
+ GF_FREE (stripe_opt);
+
return ret;
}