summaryrefslogtreecommitdiffstats
path: root/cli/src
diff options
context:
space:
mode:
Diffstat (limited to 'cli/src')
-rw-r--r--cli/src/registry.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cli/src/registry.c b/cli/src/registry.c
index 166a14897..a65e26eca 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)