summaryrefslogtreecommitdiff
path: root/vtysh
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2020-11-30 18:44:10 +0300
committerIgor Ryzhov <iryzhov@nfware.com>2020-11-30 18:55:40 +0300
commit40ab41115dd415cc42e311a96d66bb83ce4f1150 (patch)
tree21e8b247e9ff6d82af881fb19cbb0de324cb4909 /vtysh
parent8e418e8e3d2136be6e0ca23309a899dbdee77093 (diff)
vtysh: fix memory leak
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'vtysh')
-rw-r--r--vtysh/vtysh_config.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/vtysh/vtysh_config.c b/vtysh/vtysh_config.c
index 7dcf019888..f35a8af4b9 100644
--- a/vtysh/vtysh_config.c
+++ b/vtysh/vtysh_config.c
@@ -485,8 +485,10 @@ void vtysh_config_dump(void)
* are not under the VRF node.
*/
if (config->index == INTERFACE_NODE
- && list_isempty(config->line))
+ && list_isempty(config->line)) {
+ config_del(config);
continue;
+ }
vty_out(vty, "%s\n", config->name);