]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
NTLM WB: fix file descriptor leak upon OOM condition
authorYang Tse <yangsita@gmail.com>
Sat, 3 Sep 2011 23:56:30 +0000 (01:56 +0200)
committerYang Tse <yangsita@gmail.com>
Sat, 3 Sep 2011 23:56:30 +0000 (01:56 +0200)
lib/url.c

index 23ca7a5d4d42aa3fd4bb0a010897edde84dd672a..dcaf76fef5ccb8ebf0daeee167ea9de84307861a 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -120,6 +120,7 @@ int curl_win32_idn_to_ascii(const char *in, char **out);
 #include "connect.h"
 #include "inet_ntop.h"
 #include "curl_ntlm.h"
+#include "curl_ntlm_wb.h"
 #include "socks.h"
 #include "curl_rtmp.h"
 #include "gopher.h"
@@ -2531,6 +2532,10 @@ static void conn_free(struct connectdata *conn)
   if(CURL_SOCKET_BAD != conn->sock[FIRSTSOCKET])
     Curl_closesocket(conn, conn->sock[FIRSTSOCKET]);
 
+#ifdef NTLM_WB_ENABLED
+  Curl_ntlm_wb_cleanup(conn);
+#endif
+
   Curl_safefree(conn->user);
   Curl_safefree(conn->passwd);
   Curl_safefree(conn->proxyuser);