mirror of
https://github.com/curl/curl.git
synced 2025-03-07 15:27:17 +08:00
Curl_closesocket: avoid using 'conn' if NULL
... in debug-only code. Reported by Coverity CID 1516896 Closes #9907
This commit is contained in:
parent
b7e4c41aa3
commit
e1e090b89e
@ -1472,8 +1472,9 @@ bool Curl_connalive(struct connectdata *conn)
|
||||
int Curl_closesocket(struct Curl_easy *data, struct connectdata *conn,
|
||||
curl_socket_t sock)
|
||||
{
|
||||
DEBUGF(infof(data, "Curl_closesocket(conn #%ld, sock=%d), fclosesocket=%d",
|
||||
conn->connection_id, (int)sock, conn->fclosesocket));
|
||||
DEBUGF(infof(data, "Curl_closesocket(conn #%ld, sock=%d), fclosesocket=%p",
|
||||
conn ? conn->connection_id : -1,
|
||||
(int)sock, conn ? conn->fclosesocket : NULL));
|
||||
if(conn && conn->fclosesocket) {
|
||||
if((sock == conn->sock[SECONDARYSOCKET]) && conn->bits.sock_accepted)
|
||||
/* if this socket matches the second socket, and that was created with
|
||||
|
Loading…
Reference in New Issue
Block a user