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 <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2017-10-04 07:55:58 -04:00
parent 5d920111b9
commit 3e7a965235

View File

@ -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.