mirror of
https://github.com/curl/curl.git
synced 2026-04-15 00:21:42 +03:00
libssh: fix double close
libssh closes the socket in ssh_diconnect() so make sure that libcurl does not also close it. Fixes #8708 Closes #8718
This commit is contained in:
parent
6019d652b5
commit
c4d032af2a
1 changed files with 4 additions and 0 deletions
|
|
@ -1970,6 +1970,10 @@ static CURLcode myssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
}
|
||||
|
||||
ssh_disconnect(sshc->ssh_session);
|
||||
/* conn->sock[FIRSTSOCKET] is closed by ssh_disconnect behind our back,
|
||||
explicitly mark it as closed with the memdebug macro: */
|
||||
fake_sclose(conn->sock[FIRSTSOCKET]);
|
||||
conn->sock[FIRSTSOCKET] = CURL_SOCKET_BAD;
|
||||
|
||||
SSH_STRING_FREE_CHAR(sshc->homedir);
|
||||
data->state.most_recent_ftp_entrypath = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue