mirror of
https://github.com/curl/curl.git
synced 2026-08-03 20:30:36 +03:00
Call libssh2_session_free() to release memory allocated during
libssh2 startup.
This commit is contained in:
parent
438312f00e
commit
b8039a821b
1 changed files with 2 additions and 0 deletions
|
|
@ -303,6 +303,7 @@ CURLcode Curl_scp_connect(struct connectdata *conn, bool *done)
|
|||
|
||||
if (libssh2_session_startup(scp->scpSession, sock)) {
|
||||
failf(data, "Failure establishing ssh session\n");
|
||||
libssh2_session_free(scp->scpSession);
|
||||
Curl_safefree(scp->path);
|
||||
return CURLE_FAILED_INIT;
|
||||
}
|
||||
|
|
@ -395,6 +396,7 @@ CURLcode Curl_scp_connect(struct connectdata *conn, bool *done)
|
|||
|
||||
if (!authed) {
|
||||
failf(data, "Authentication failure\n");
|
||||
libssh2_session_free(scp->scpSession);
|
||||
Curl_safefree(scp->path);
|
||||
return CURLE_FAILED_INIT;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue