vtysh: fix memory leak

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
Igor Ryzhov 2020-11-30 18:44:10 +03:00
parent 8e418e8e3d
commit 40ab41115d

View File

@ -485,8 +485,10 @@ void vtysh_config_dump(void)
* are not under the VRF node. * are not under the VRF node.
*/ */
if (config->index == INTERFACE_NODE if (config->index == INTERFACE_NODE
&& list_isempty(config->line)) && list_isempty(config->line)) {
config_del(config);
continue; continue;
}
vty_out(vty, "%s\n", config->name); vty_out(vty, "%s\n", config->name);