diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2017-03-07 19:16:21 +0100 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2017-03-07 19:20:05 +0100 |
| commit | 09e61a383facd3c9e3e52162e98302c7cba15ecc (patch) | |
| tree | e3ae7e36778726e6d2bffd20cdcad3f84a2ae8e3 | |
| parent | fc2af2b7291f8858db84fc5d8b5104f30eb5d33c (diff) | |
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>
| -rw-r--r-- | vtysh/vtysh.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 1b0dd8cd29..48f608b8b2 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); } |
