summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPoornima <pgurusid@redhat.com>2014-01-31 01:12:32 +0000
committerVijay Bellur <vbellur@redhat.com>2014-02-05 21:46:07 -0800
commit60c1fa2ada704343c841b9a95d3f1cc1632fa00a (patch)
tree799565ab7c44bcea3ea0f2afb9209ac782f92218
parentd0574d040b3d7f54ddafa0b768ddfc1e7f247536 (diff)
mgmt/glusterd: Fix double free.
Change-Id: I7a8b7772849715b019c86c6c768f33c1d9dcb27c BUG: 789278 Signed-off-by: Poornima <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/6881 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 8d7e09838a7..b26a7ef3d95 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -363,10 +363,9 @@ volopt_trie_section (int lvl, char **patt, char *word, char **hint, int hints)
GF_ASSERT (hints <= 2);
nodevec.cnt = hints;
ret = trie_measure_vec (trie, word, &nodevec);
- if (ret || !nodevec.nodes[0])
- trie_destroy (trie);
+ if (!ret && nodevec.nodes[0])
+ ret = process_nodevec (&nodevec, hint);
- ret = process_nodevec (&nodevec, hint);
trie_destroy (trie);
return ret;