summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2011-09-12 11:28:45 +0530
committerVijay Bellur <vijay@gluster.com>2011-09-23 07:17:15 -0700
commit021fac0c945e364d710a6bb5587c056bca47728c (patch)
tree590ce0aa6291c24d197c0611a1a990282c32d09b
parentf46e13075f8f1a3ef171777c50446db32909db9c (diff)
glusterd: free the allocated string to avoid memleak
Change-Id: I690b78032060732c1783e4f9049a114e594a3455 BUG: 3341 Reviewed-on: http://review.gluster.com/179 Reviewed-by: Amar Tumballi <amar@gluster.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 84725982b..bd56daa11 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -772,6 +772,9 @@ glusterd_check_globaloption (char *key)
}
}
+ if (completion)
+ GF_FREE (completion);
+
for (vmep = glusterd_volopt_map; vmep->key; vmep++) {
if (strcmp (vmep->key, key) == 0) {
if ((vmep->type == GLOBAL_DOC) ||
@@ -806,6 +809,9 @@ glusterd_check_localoption (char *key)
}
}
+ if (completion)
+ GF_FREE (completion);
+
for (vmep = glusterd_volopt_map; vmep->key; vmep++) {
if (strcmp (vmep->key, key) == 0) {
if ((vmep->type == DOC) ||
@@ -840,6 +846,9 @@ glusterd_check_voloption (char *key)
}
}
+ if (completion)
+ GF_FREE (completion);
+
for (vmep = glusterd_volopt_map; vmep->key; vmep++) {
if (strcmp (vmep->key, key) == 0) {
if ((vmep->type == DOC) ||