]> git.puffer.fish Git - mirror/frr.git/commitdiff
vtysh: fix memory leak
authorIgor Ryzhov <iryzhov@nfware.com>
Mon, 30 Nov 2020 15:44:10 +0000 (18:44 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Mon, 30 Nov 2020 15:55:40 +0000 (18:55 +0300)
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
vtysh/vtysh_config.c

index 7dcf0198882200b44142f346d55e0f51ec121809..f35a8af4b9942ca1aefd3ee81d1952650bef301e 100644 (file)
@@ -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);