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
base: master
from

Conversation

Projects
None yet
2 participants
@danielgustafsson
Member

danielgustafsson 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

danielgustafsson added some commits Sep 11, 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

This comment has been minimized.

Member

danielgustafsson 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.

Member

danielgustafsson commented Sep 11, 2018

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

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