aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gustafsson <daniel@yesql.se>2018-09-13 10:06:05 +0200
committerDaniel Gustafsson <daniel@yesql.se>2018-09-13 10:06:05 +0200
commit60ed8d72760b911ff8f56e02acc083f79b567af6 (patch)
tree1a7bc92d1bf1596a6c10f101cb057ac53e706dd2
parent66b3c186fa9a06d313501c80f02e7125acb78c3d (diff)
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>
-rw-r--r--lib/curl_ntlm_wb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/curl_ntlm_wb.c b/lib/curl_ntlm_wb.c
index baf579ef7..949c7fa17 100644
--- a/lib/curl_ntlm_wb.c
+++ b/lib/curl_ntlm_wb.c
@@ -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;
}