mirror of
https://github.com/curl/curl.git
synced 2024-11-27 05:50:21 +08:00
ntlm_wb: Fix memory leaks in ntlm_wb_response
When erroring out on a request being too large, the existing buffer was leaked. Fix by explicitly freeing on the way out. Closes #2966 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
This commit is contained in:
parent
66b3c186fa
commit
60ed8d7276
@ -295,6 +295,7 @@ static CURLcode ntlm_wb_response(struct connectdata *conn,
|
||||
|
||||
if(len_out > MAX_NTLM_WB_RESPONSE) {
|
||||
failf(conn->data, "too large ntlm_wb response!");
|
||||
free(buf);
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user