Since the NSS lib closes the socket the memory tracking system wrongly gets a

false positive on a leaked socket, so this introduces a way to tell the system
that the socket is indeed closed without explicitly closing it!
This commit is contained in:
Daniel Stenberg
2009-10-28 20:30:23 +00:00
parent 0d9f14f5c1
commit 6a79b0e859
3 changed files with 17 additions and 3 deletions

View File

@@ -930,6 +930,7 @@ void Curl_nss_close(struct connectdata *conn, int sockindex)
/* NSS closes the socket we previously handed to it, so we must mark it
as closed to avoid double close */
fake_sclose(conn->sock[sockindex]);
conn->sock[sockindex] = CURL_SOCKET_BAD;
if(connssl->client_nickname != NULL) {
free(connssl->client_nickname);