From 27dfc6355d12777684ff7e106464338354fbd295 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 4 Oct 2017 07:55:58 -0400 Subject: [PATCH] ripngd: Fix possible memory leak of route_node There exists a path where we do not save the route_node after creation. Allow cleanup. Signed-off-by: Donald Sharp --- ripngd/ripngd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c index 51475dc642..5e2a626f90 100644 --- a/ripngd/ripngd.c +++ b/ripngd/ripngd.c @@ -842,6 +842,8 @@ static void ripng_route_process(struct rte *rte, struct sockaddr_in6 *from, unusable). */ if (rte->metric != RIPNG_METRIC_INFINITY) ripng_ecmp_add(&newinfo); + else + route_unlock_node(rp); } else { /* If there is an existing route, compare the next hop address to the address of the router from which the datagram came. -- 2.39.5