summaryrefslogtreecommitdiff
path: root/ripngd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-10-04 07:55:58 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-10-10 12:35:16 -0400
commit3e7a9652355b36da31911c4aed63250e0050b54b (patch)
tree01e0d4c83abc2eb771da79bcac6a3293065b053a /ripngd
parent5d920111b9d5b460052a257656f58d8c093c236f (diff)
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>
Diffstat (limited to 'ripngd')
-rw-r--r--ripngd/ripngd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c
index 4df1aafe5d..7524061ad2 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.