- Zmey Petroff found a crash when libcurl accessed a NULL pointer, which

happened if you set the connection cache size to 1 and for example failed to
  login to an FTP site. Bug report #1896698
  (http://curl.haxx.se/bug/view.cgi?id=1896698)
This commit is contained in:
Daniel Stenberg
2008-02-21 17:52:16 +00:00
parent 5e9c564883
commit e9bb7b7712
3 changed files with 14 additions and 3 deletions

View File

@@ -2389,8 +2389,12 @@ CURLcode Curl_perform(struct SessionHandle *data)
if(CURLE_OK == res)
res = res2;
}
else
/* Curl_do() failed, clean up left-overs in the done-call */
else if(conn)
/* Curl_do() failed, clean up left-overs in the done-call, but note
that at some cases the conn pointer is NULL when Curl_do() failed
and the connection cache is very small so only call Curl_done() if
conn is still "alive".
*/
res2 = Curl_done(&conn, res, FALSE);
/*