From 97857de80eea0b3028036c6796c2f485f4caf7d9 Mon Sep 17 00:00:00 2001
From: Steve Holme <steve_holme@hotmail.com>
Date: Thu, 30 Jan 2014 20:59:26 +0000
Subject: [PATCH] ntlm: Fixed a memory leak when using NTLM with a proxy server

---
 lib/curl_ntlm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/curl_ntlm.c b/lib/curl_ntlm.c
index 0995eab270..8c02aba5da 100644
--- a/lib/curl_ntlm.c
+++ b/lib/curl_ntlm.c
@@ -239,8 +239,10 @@ void Curl_http_ntlm_cleanup(struct connectdata *conn)
 #ifndef USE_WINDOWS_SSPI
   Curl_safefree(conn->ntlm.target_info);
   conn->ntlm.target_info_len = 0;
-#endif
 
+  Curl_safefree(conn->proxyntlm.target_info);
+  conn->proxyntlm.target_info_len = 0;
+#endif
 }
 
 #endif /* USE_NTLM */
-- 
GitLab