diff --git a/lib/ssh.c b/lib/ssh.c index a4b2ca43ab..da896196f3 100644 --- a/lib/ssh.c +++ b/lib/ssh.c @@ -2926,7 +2926,7 @@ static CURLcode ssh_connect(struct connectdata *conn, bool *done) int rc; ssh->kh = libssh2_knownhost_init(ssh->ssh_session); if(!ssh->kh) { - /* eeek. TODO: free the ssh_session! */ + libssh2_session_free(ssh->ssh_session); return CURLE_FAILED_INIT; }