From: Donald Sharp Date: Wed, 14 Dec 2022 19:20:26 +0000 (-0500) Subject: zebra: When freeing the early route queue, actually free it right X-Git-Tag: base_8.5~135^2~3 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=739bc9fd72d015e166f24ae898754161de7e1364;p=mirror%2Ffrr.git zebra: When freeing the early route queue, actually free it right The early route queue has a series of `struct zebra_early_route *` entries. Zebra is treating this memory as just a `struct route entry`. This is wrong. Correct this to free the memory correctly. Signed-off-by: Donald Sharp --- diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index fda21b2016..9551f26d80 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -3681,14 +3681,14 @@ static void rib_meta_queue_free(struct meta_queue *mq, struct list *l, static void early_route_meta_queue_free(struct meta_queue *mq, struct list *l, struct zebra_vrf *zvrf) { - struct zebra_early_route *zer; + struct zebra_early_route *ere; struct listnode *node, *nnode; - for (ALL_LIST_ELEMENTS(l, node, nnode, zer)) { - if (zvrf && zer->re->vrf_id != zvrf->vrf->vrf_id) + for (ALL_LIST_ELEMENTS(l, node, nnode, ere)) { + if (zvrf && ere->re->vrf_id != zvrf->vrf->vrf_id) continue; - XFREE(MTYPE_RE, zer); + early_route_memory_free(ere); node->data = NULL; list_delete_node(l, node); mq->size--;