From: Daniel Stenberg Date: Thu, 5 Jul 2018 20:45:01 +0000 (+0200) Subject: libssh: goto DISCONNECT state on error, not SSH_SESSION_FREE X-Git-Tag: curl-7_61_0~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=03d884b7d867140f283a21d552c816bce2e25b86;p=thirdparty%2Fcurl.git libssh: goto DISCONNECT state on error, not SSH_SESSION_FREE ... because otherwise not everything get closed down correctly. Fixes #2708 Closes #2712 --- diff --git a/lib/ssh-libssh.c b/lib/ssh-libssh.c index 1c00879bad..cecf477ac3 100644 --- a/lib/ssh-libssh.c +++ b/lib/ssh-libssh.c @@ -429,7 +429,7 @@ cleanup: } #define MOVE_TO_ERROR_STATE(_r) { \ - state(conn, SSH_SESSION_FREE); \ + state(conn, SSH_SESSION_DISCONNECT); \ sshc->actualcode = _r; \ rc = SSH_ERROR; \ break; \