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

HttpPostStandardRequestDecoder leaks memory when constructor throws E… #9517

Merged
merged 1 commit into from
Aug 28, 2019

Conversation

normanmaurer
Copy link
Member

…rrorDataDecoderException.

Motivation:

Currently when HttpPostStandardRequestDecoder throws a ErrorDataDecoderException during construction we leak memory. We need to ensure all is released correctly.

Modifications:

  • Call destroy() if parseBody() throws and rethrow the ErrorDataDecoderException
  • Add unit test

Result:

Fixes #9513.

…rrorDataDecoderException.

Motivation:

Currently when HttpPostStandardRequestDecoder throws a ErrorDataDecoderException during construction we leak memory. We need to ensure all is released correctly.

Modifications:

- Call destroy() if parseBody() throws and rethrow the ErrorDataDecoderException
- Add unit test

Result:

Fixes #9513.
@normanmaurer
Copy link
Member Author

Let me pull this in as its an easy one.

@normanmaurer normanmaurer merged commit 95527ee into 4.1 Aug 28, 2019
@normanmaurer normanmaurer deleted the not_leak_when_parse_throws branch August 28, 2019 08:27
normanmaurer added a commit that referenced this pull request Aug 28, 2019
…rrorDataDecoderException. (#9517)

Motivation:

Currently when HttpPostStandardRequestDecoder throws a ErrorDataDecoderException during construction we leak memory. We need to ensure all is released correctly.

Modifications:

- Call destroy() if parseBody() throws and rethrow the ErrorDataDecoderException
- Add unit test

Result:

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

Successfully merging this pull request may close these issues.

HttpPostStandardRequestDecoder memory leak
1 participant