From 6a8d7653347402986e99d5acc9040a5dcd9ff6d5 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 30 Apr 2010 13:24:09 +0800 Subject: [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. --- openbsc/src/vty/vty.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'openbsc/src') diff --git a/openbsc/src/vty/vty.c b/openbsc/src/vty/vty.c index fffa649c7..08068560b 100644 --- a/openbsc/src/vty/vty.c +++ b/openbsc/src/vty/vty.c @@ -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++) { -- cgit v1.2.3