summaryrefslogtreecommitdiffstats
path: root/ripd
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2018-07-09 15:46:40 +0200
committerRenato Westphal <renato@opensourcerouting.org>2018-10-27 20:16:12 +0200
commit72010aca150703659f0fc979928f2ec3aa170d69 (patch)
tree016e96b156876fee3b579f9acd925abc7abb3ce7 /ripd
parentripd: retrofit all RIP interface commands to the new northbound model (diff)
downloadfrr-72010aca150703659f0fc979928f2ec3aa170d69.tar.xz
frr-72010aca150703659f0fc979928f2ec3aa170d69.zip
ripd: fix memory leaks when interfaces are deleted
This memleak has been present for at least 16 years. Fix it. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ripd')
-rw-r--r--ripd/rip_interface.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c
index 77c8eb48f..f0bc0cd9e 100644
--- a/ripd/rip_interface.c
+++ b/ripd/rip_interface.c
@@ -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;