diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-12-06 08:57:00 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-06 08:57:00 +0200 |
| commit | 90bf4243fb80cc66e7dfbeb9712c43a3938b985c (patch) | |
| tree | 2ddd135e5382e8eab5780fccaaf8601d5cba769c | |
| parent | ed7d45f8287cb4b283b2b6ebc41e1bba7c8d1b27 (diff) | |
| parent | 5098d577d201fe3c09893b4f1410b70f1ec58941 (diff) | |
Merge pull request #12443 from donaldsharp/vtysh_mem_leak_2
vtysh: free memory given to us by readline
| -rw-r--r-- | vtysh/vtysh_main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/vtysh/vtysh_main.c b/vtysh/vtysh_main.c index ca119eb900..a72cb6e809 100644 --- a/vtysh/vtysh_main.c +++ b/vtysh/vtysh_main.c @@ -111,6 +111,8 @@ static void vtysh_rl_callback(char *line_read) if (!vtysh_loop_exited) rl_callback_handler_install(vtysh_prompt(), vtysh_rl_callback); + + free(line_read); } /* SIGTSTP handler. This function care user's ^Z input. */ |
