-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bgpd: Fix up memory leak in processing eoiu marker #18000
Conversation
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>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
@@ -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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a similar problem in other_meta_queue_free()
- that's not un-ref'ing or freeing the dests either
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there should not be. The eoiu marker is the only one where a fake
dest is created that needs to be deleted on the other side.
@Mergifyio backport dev/10.3 |
✅ Backports have been created
|
bgpd: Fix up memory leak in processing eoiu marker (backport #18000)
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.