]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Fix up memory leak in processing eoiu marker 18000/head
authorDonald Sharp <sharpd@nvidia.com>
Tue, 4 Feb 2025 15:56:59 +0000 (10:56 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Tue, 4 Feb 2025 15:56:59 +0000 (10:56 -0500)
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>
bgpd/bgp_route.c

index e932738cd41647e99de70d642aeb64f02cfac080..84f565b4deaacb2121ec03f50117f038dde7556f 100644 (file)
@@ -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--;
        }
 }