]> git.proxmox.com Git - mirror_frr.git/commitdiff
ripngd: Fix possible memory leak of route_node
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 4 Oct 2017 11:55:58 +0000 (07:55 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 10 Oct 2017 16:35:16 +0000 (12:35 -0400)
There exists a path where we do not save the route_node
after creation.  Allow cleanup.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
ripngd/ripngd.c

index 4df1aafe5d839c04a70f64f2687d7cb9f72e380f..7524061ad2b3796e9fa8118d49951f46f5e851ee 100644 (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.