]> git.proxmox.com Git - mirror_frr.git/commitdiff
ripd: fix memory leaks when interfaces are deleted
authorRenato Westphal <renato@opensourcerouting.org>
Mon, 9 Jul 2018 13:46:40 +0000 (10:46 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Sat, 27 Oct 2018 18:16:12 +0000 (16:16 -0200)
This memleak has been present for at least 16 years. Fix it.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
ripd/rip_interface.c

index 77c8eb48fb4ba1cd3e4789d3c67f0dd92afbcc4c..f0bc0cd9e089a67227f4560c379dd8ce078dcd11 100644 (file)
@@ -1225,6 +1225,7 @@ static int rip_interface_new_hook(struct interface *ifp)
 /* Called when interface structure deleted. */
 static int rip_interface_delete_hook(struct interface *ifp)
 {
+       rip_interface_reset(ifp->info);
        XFREE(MTYPE_RIP_INTERFACE, ifp->info);
        ifp->info = NULL;
        return 0;