From 6312b2fca35b907acf6d29591a608767a2d67781 Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Tue, 22 Feb 2011 01:38:30 +0000 Subject: 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 Signed-off-by: Anand V. Avati 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 --- cli/src/registry.c | 3 +++ 1 file changed, 3 insertions(+) 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) -- cgit