mirror of
https://github.com/curl/curl.git
synced 2026-08-25 04:53:31 +03:00
close the existing socket when trying next IP, as otherwise we leak one!
bug #1326306
This commit is contained in:
parent
c890149c8c
commit
9e0882ba98
1 changed files with 3 additions and 0 deletions
|
|
@ -472,6 +472,9 @@ static bool trynextip(struct connectdata *conn,
|
||||||
if(sockindex != FIRSTSOCKET)
|
if(sockindex != FIRSTSOCKET)
|
||||||
return TRUE; /* no next */
|
return TRUE; /* no next */
|
||||||
|
|
||||||
|
/* first close the failed socket */
|
||||||
|
sclose(conn->sock[sockindex]);
|
||||||
|
|
||||||
/* try the next address */
|
/* try the next address */
|
||||||
ai = conn->ip_addr->ai_next;
|
ai = conn->ip_addr->ai_next;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue