]> git.ipfire.org Git - thirdparty/curl.git/commit
sws: pass in socket reference to allow function to close it
authorDaniel Stenberg <daniel@haxx.se>
Sun, 12 Oct 2025 09:15:08 +0000 (11:15 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 12 Oct 2025 13:35:14 +0000 (15:35 +0200)
commit1e90a63a49e9cbfea8ff52055576df1189b47a7d
treebf210d3f2063ca2195c742db781c3657da7d7566
parent578706addec3d41cb5db64160d23795a95ca11d9
sws: pass in socket reference to allow function to close it

The function service_connection() now passes in a reference to the
socket instead of by value since the sub function http_connect() might
close it and set *infdp = CURL_SOCKET_BAD. This would previously not be
detected when service_connection() returned and potentially cause a
double close of the socket.

Reported-by: Joshua Rogers
Closes #19031
tests/server/sws.c