diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2016-09-09 23:58:33 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2016-09-09 23:58:33 +0200 |
commit | 039dc61292de5f3ed5f46316b1940ab6bb184c3f (patch) | |
tree | 5db04ee53a9381411a784c80c9b741f4a72f961d /vtysh/vtysh.c | |
parent | Merge branch 'cmaster-next' of ssh://stash.cumulusnetworks.com:7999/quag/quag... (diff) | |
download | frr-039dc61292de5f3ed5f46316b1940ab6bb184c3f.tar.xz frr-039dc61292de5f3ed5f46316b1940ab6bb184c3f.zip |
lib: Fix tab completions memleak, memory stats corruption
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'vtysh/vtysh.c')
-rw-r--r-- | vtysh/vtysh.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 2436c6182..d01a1bceb 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -885,7 +885,10 @@ command_generator (const char *text, int state) if (rl_end && isspace ((int) rl_line_buffer[rl_end - 1])) vector_set (vline, NULL); + if (matched) + XFREE (MTYPE_TMP, matched); matched = cmd_complete_command (vline, vty, &complete_status); + cmd_free_strvec (vline); } if (matched && matched[index]) |