Changelog
Daniel Stenberg (18 Oct 2009)
+- Fixed memory leak in the SCP/SFTP code as it never freed the knownhosts
+ data!
+
- John Dennis filed bug report #2873666
(http://curl.haxx.se/bug/view.cgi?id=2873666) which identified a problem
which made libcurl loop infinitely when given incorrect credentials when
o invalid file name characters handling on Windows
o double close() on the primary socket with libcurl-NSS
o GSS negotiate infinite loop on bad credentials
+ o memory leak in SCP/SFTP connections
This release includes the following known bugs:
break;
case SSH_SESSION_FREE:
+#ifdef HAVE_LIBSSH2_KNOWNHOST_API
+ if(sshc->kh) {
+ libssh2_knownhost_free(sshc->kh);
+ sshc->kh = NULL;
+ }
+#endif
+
if(sshc->ssh_session) {
rc = libssh2_session_free(sshc->ssh_session);
if(rc == LIBSSH2_ERROR_EAGAIN) {
static CURLcode scp_disconnect(struct connectdata *conn)
{
CURLcode result = CURLE_OK;
+ struct ssh_conn *ssh = &conn->proto.sshc;
Curl_safefree(conn->data->state.proto.ssh);
conn->data->state.proto.ssh = NULL;
- if(conn->proto.sshc.ssh_session) {
+ if(ssh->ssh_session) {
/* only if there's a session still around to use! */
state(conn, SSH_SESSION_DISCONNECT);