diff options
author | Raghavendra Bhat <raghavendrabhat@gluster.com> | 2011-02-22 01:38:30 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2011-02-22 02:11:34 -0800 |
commit | 6312b2fca35b907acf6d29591a608767a2d67781 (patch) | |
tree | fd8a569da25b2e65aebac83f8e52e5226ae7152d /cli | |
parent | ccee8039720f8253d460384aa6659edd8e75f3db (diff) |
free the tokens obtained from the cli
The cli command which is tokenized is not freed leading to a memory
leak.
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 2113 (cli: memory corruption in add-brick and create volume parsing functions)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2113
Diffstat (limited to 'cli')
-rw-r--r-- | cli/src/registry.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cli/src/registry.c b/cli/src/registry.c index 166a148976f..a65e26ecaee 100644 --- a/cli/src/registry.c +++ b/cli/src/registry.c @@ -379,6 +379,9 @@ cli_cmd_register (struct cli_cmd_tree *tree, const char *template, if (ret) goto err; + if (tokens) + cli_cmd_tokens_destroy (tokens); + return 0; err: if (tokens) |