Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

donaldsharp
Copy link
Member

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.

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 <[email protected]>
Copy link
Member

@riw777 riw777 left a 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);
Copy link
Contributor

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

Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants