]> granicus.if.org Git - curl/commitdiff
As has been pointed out, err_msg should not be freed here. The actual
authorJames Housley <jim@thehousleys.net>
Wed, 18 Jul 2007 18:31:34 +0000 (18:31 +0000)
committerJames Housley <jim@thehousleys.net>
Wed, 18 Jul 2007 18:31:34 +0000 (18:31 +0000)
issue is in libssh2 and not freeing a dynamic error message during cleanup.

lib/ssh.c

index 141ebebf4f446c0ca96f0b625868c07fd11b0c0e..ca4d2ac610c678beca0b1f6a35bdf614736d4275 100644 (file)
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -1643,7 +1643,6 @@ static CURLcode ssh_statemach_act(struct connectdata *conn)
                                                &err_msg, NULL, 0);
           err = libssh2_session_error_to_CURLE(ssh_err);
           failf(conn->data, "%s", err_msg);
-          Curl_safefree(err_msg);
           state(conn, SSH_SCP_CHANNEL_FREE);
           sshc->actualCode = err;
           break;
@@ -1686,7 +1685,6 @@ static CURLcode ssh_statemach_act(struct connectdata *conn)
                                                  &err_msg, NULL, 0);
             err = libssh2_session_error_to_CURLE(ssh_err);
             failf(conn->data, "%s", err_msg);
-            Curl_safefree(err_msg);
             state(conn, SSH_SCP_CHANNEL_FREE);
             sshc->actualCode = err;
             break;