summaryrefslogtreecommitdiffstats
path: root/lib/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/command.c')
-rw-r--r--lib/command.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/command.c b/lib/command.c
index 5c57e79c..316971e4 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -1629,12 +1629,14 @@ cmd_describe_command_real (vector vline, struct vty *vty, int *status)
if ((ret = is_cmd_ambiguous (command, cmd_vector, i, match)) == 1)
{
vector_free (cmd_vector);
+ vector_free (matchvec);
*status = CMD_ERR_AMBIGUOUS;
return NULL;
}
else if (ret == 2)
{
vector_free (cmd_vector);
+ vector_free (matchvec);
*status = CMD_ERR_NO_MATCH;
return NULL;
}