summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/stripe
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2012-06-05 14:15:54 +0530
committerAnand Avati <avati@redhat.com>2012-06-05 10:45:10 -0700
commit6eee473eba94697953e8b3e1b04fe5ef1de5f474 (patch)
treed435b4f4186690907c39a28257f3707ea86bbeb1 /xlators/cluster/stripe
parent04fd2972fe8a9b9568ac781ba7677f13fdce0f57 (diff)
core: coverity fixes (mostly resource leak fixes)
currently working on obvious resource leak reports in coverity Change-Id: I261f4c578987b16da399ab5a504ad0fda0b176b1 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 789278 Reviewed-on: http://review.gluster.com/3265 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/cluster/stripe')
-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;
}