Skip to content

ntlm_wb: Fix memory leaks in ntlm_wb_response errorcases - #2966

Closed
danielgustafsson wants to merge 2 commits into
curl:masterfrom
danielgustafsson:dg-ntlm_leak
Closed

danielgustafsson wants to merge 2 commits into
curl:masterfrom
danielgustafsson:dg-ntlm_leak

Conversation

@danielgustafsson

Copy link
Copy Markdown
Contributor

When erroring out on either realloc failure, or a request being too large the existing buffer was leaked. Fix by adding a fail clause and free the buffer on the way out.

When erroring out on either realloc failure, or a request being
too large, the existing buffer was leaked. Fix by adding a fail
clause and free the buffer on the way out.

Closes: curl#2966
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
@danielgustafsson

Copy link
Copy Markdown
Contributor Author

This patch was actually wrong, it erroneously introduced a double-free on Curl_saferealloc() failure, pushed an updated fix to be squashed before pushing.

@danielgustafsson

Copy link
Copy Markdown
Contributor Author

None of the errors are related to the PR in question, seems mostly relate to Github flakiness

@lock lock Bot locked as resolved and limited conversation to collaborators Dec 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants