From 60ed8d72760b911ff8f56e02acc083f79b567af6 Mon Sep 17 00:00:00 2001 From: Daniel Gustafsson Date: Thu, 13 Sep 2018 10:06:05 +0200 Subject: 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 --- lib/curl_ntlm_wb.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/curl_ntlm_wb.c') 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; } -- cgit v1.2.3