summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/stripe/src/stripe-helpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/stripe/src/stripe-helpers.c')
-rw-r--r--xlators/cluster/stripe/src/stripe-helpers.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/xlators/cluster/stripe/src/stripe-helpers.c b/xlators/cluster/stripe/src/stripe-helpers.c
index ed7ed1a0b79..dcd2022f7f2 100644
--- a/xlators/cluster/stripe/src/stripe-helpers.c
+++ b/xlators/cluster/stripe/src/stripe-helpers.c
@@ -440,7 +440,6 @@ set_stripe_block_size (xlator_t *this, stripe_private_t *priv, char *data)
stripe_opt = GF_CALLOC (1, sizeof (struct stripe_options),
gf_stripe_mt_stripe_options);
if (!stripe_opt) {
- GF_FREE (dup_str);
goto out;
}
@@ -486,10 +485,15 @@ set_stripe_block_size (xlator_t *this, stripe_private_t *priv, char *data)
stripe_str = strtok_r (NULL, ",", &tmp_str);
GF_FREE (dup_str);
+ dup_str = NULL;
}
ret = 0;
out:
+
+ if (dup_str)
+ GF_FREE (dup_str);
+
return ret;
}