curl-library
Re: curl_multi_remove_handle() crashes if called before transfers are complete.
Date: Thu, 10 Mar 2011 13:54:41 -0500
I moved the 2 lines of codes from above the if statement to below it and
re-built. But the problem persists.
diff --git a/lib/ssh.c b/lib/ssh.c
index 1aaa112..bfc36f7 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -2879,14 +2879,13 @@ static CURLcode sftp_disconnect(struct connectdata
*conn, bool dead_connection)
DEBUGF(infof(conn->data, "SSH DISCONNECT starts now\n"));
- Curl_safefree(conn->data->state.proto.ssh);
- conn->data->state.proto.ssh = NULL;
-
if(conn->proto.sshc.ssh_session) {
/* only if there's a session still around to use! */
state(conn, SSH_SFTP_SHUTDOWN);
result = ssh_easy_statemach(conn, FALSE);
}
+ Curl_safefree(conn->data->state.proto.ssh);
+ conn->data->state.proto.ssh = NULL;
DEBUGF(infof(conn->data, "SSH DISCONNECT is done\n"));
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-03-10