diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/vty/command.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vty/command.c b/src/vty/command.c index 4f47a6be..faa7c51c 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -1574,10 +1574,12 @@ 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; } @@ -1724,6 +1726,7 @@ static char **cmd_complete_command_real(vector vline, struct vty *vty, if (vector_active(vline) == 0) { *status = CMD_ERR_NO_MATCH; + vector_free(cmd_vector); return NULL; } else index = vector_active(vline) - 1; |