summaryrefslogtreecommitdiffstats
path: root/vtysh/vtysh.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2017-03-07 19:16:21 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2017-03-07 19:20:05 +0100
commit09e61a383facd3c9e3e52162e98302c7cba15ecc (patch)
treee3ae7e36778726e6d2bffd20cdcad3f84a2ae8e3 /vtysh/vtysh.c
parentMerge pull request #256 from donaldsharp/bgp_bfd_fix (diff)
downloadfrr-09e61a383facd3c9e3e52162e98302c7cba15ecc.tar.xz
frr-09e61a383facd3c9e3e52162e98302c7cba15ecc.zip
vtysh: fix completion
The return value from cmd_complete_command is a VECTOR_INDEX, not TMP. Use the appropriate vector_only_index_free(). Fixes #223. Reported-by: https://github.com/k0ste Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'vtysh/vtysh.c')
-rw-r--r--vtysh/vtysh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 1b0dd8cd2..48f608b8b 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -832,7 +832,7 @@ command_generator (const char *text, int state)
vector_set (vline, NULL);
if (matched)
- XFREE (MTYPE_TMP, matched);
+ vector_only_index_free (matched);
matched = cmd_complete_command (vline, vty, &complete_status);
cmd_free_strvec (vline);
}