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

ntlm_wb: Fix memory leaks in ntlm_wb_response errorcases #2966

Closed
wants to merge 2 commits into from

Conversation

@danielgustafsson
Copy link
Member

commented Sep 10, 2018

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.

@bagder
bagder approved these changes Sep 10, 2018
ntlm_wb: Fix memory leaks in ntlm_wb_response
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: #2966
Reviewed-by: Daniel Stenberg <daniel@haxx.se>

@danielgustafsson danielgustafsson force-pushed the danielgustafsson:dg-ntlm_leak branch from efe4b2f to 69acd9f Sep 11, 2018

@danielgustafsson

This comment has been minimized.

Copy link
Member Author

commented Sep 11, 2018

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

This comment has been minimized.

Copy link
Member Author

commented Sep 11, 2018

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.
Projects
None yet
2 participants
You can’t perform that action at this time.