summaryrefslogtreecommitdiff
path: root/bgpd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2025-02-04 10:56:59 -0500
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2025-02-05 05:22:23 +0000
commit9b993978596e74a56207a0e0cde7acc4941dc5cd (patch)
tree8e39a9e16ae9ba3caf4a921ced4688a9ad61ddbf /bgpd
parentb2f9962550a7b0275a786989f6fa943f5066f46d (diff)
bgpd: Fix up memory leak in processing eoiu marker
Memory is being leaked when processing the eoiu marker. BGP is creating a dummy dest to contain the data but it was never freed. As well as the eoiu info was not being freed either. Signed-off-by: Donald Sharp <sharpd@nvidia.com> (cherry picked from commit c6b7a993fb2961e04d069f1779498342aa7932fd)
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_route.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index e932738cd4..84f565b4de 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -4120,6 +4120,9 @@ static void process_eoiu_marker(struct bgp_dest *dest)
subqueue2str(META_QUEUE_EOIU_MARKER));
bgp_process_main_one(info->bgp, NULL, 0, 0);
+
+ XFREE(MTYPE_BGP_EOIU_MARKER_INFO, info);
+ XFREE(MTYPE_BGP_NODE, dest);
}
/*
@@ -4310,6 +4313,7 @@ static void eoiu_marker_queue_free(struct meta_queue *mq, struct bgp_dest_queue
XFREE(MTYPE_BGP_EOIU_MARKER_INFO, dest->info);
STAILQ_REMOVE_HEAD(l, pq);
STAILQ_NEXT(dest, pq) = NULL; /* complete unlink */
+ XFREE(MTYPE_BGP_NODE, dest);
mq->size--;
}
}