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

Fix potential memory leak when using ReadBodyRoutePredicateFactory #3465

Closed
wants to merge 6 commits into from

Conversation

qnnn
Copy link
Contributor

@qnnn qnnn commented Jul 19, 2024

In ReadBodyRoutePredicateFactory, when the predicate for the request body is not matched and none of the remaining Route predicates are matched, the CACHED_REQUEST_BODY_ATTR in the attributes is not cleared. This can lead to memory leaks.

@pivotal-cla
Copy link

@qnnn Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-cla
Copy link

@qnnn Thank you for signing the Contributor License Agreement!

@qnnn
Copy link
Contributor Author

qnnn commented Sep 6, 2024

I have updated my code to place the clearCachedRequestBody after the route is not found, to avoid the issue where it might not be cleared after hitting other handle mappings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants