summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-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 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)