[vty] Free the matched at the end of the routine.

Remove the return from the case labels and cleanup at
the end matched array at the end of the routine.
This commit is contained in:
Holger Hans Peter Freyther 2010-04-30 13:24:09 +08:00
parent f1af306c94
commit a4b446b459
1 changed files with 0 additions and 4 deletions

View File

@ -916,8 +916,6 @@ static void vty_complete_command(struct vty *vty)
vty_insert_word_overwrite(vty, matched[0]);
vty_self_insert(vty, ' ');
talloc_free(matched[0]);
vector_only_index_free(matched);
return;
break;
case CMD_COMPLETE_MATCH:
vty_prompt(vty);
@ -925,8 +923,6 @@ static void vty_complete_command(struct vty *vty)
vty_backward_pure_word(vty);
vty_insert_word_overwrite(vty, matched[0]);
talloc_free(matched[0]);
vector_only_index_free(matched);
return;
break;
case CMD_COMPLETE_LIST_MATCH:
for (i = 0; matched[i] != NULL; i++) {