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);