diff options
author | Gisle Vanem <gvanem@broadpark.no> | 2006-11-14 20:26:13 +0000 |
---|---|---|
committer | Gisle Vanem <gvanem@broadpark.no> | 2006-11-14 20:26:13 +0000 |
commit | 438312f00e3813efe576a2d5d78844b5451b1f69 (patch) | |
tree | 9bc50630df9febbfa4de1ec9ce865b28551f6ccd | |
parent | 381ccaa3916eb6b71a9c45065de52dda70d755a7 (diff) |
Free 'scp->path' in case of libssh2 setup failure.
-rw-r--r-- | lib/ssh.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -294,6 +294,7 @@ CURLcode Curl_scp_connect(struct connectdata *conn, bool *done) libssh2_realloc, NULL); if (scp->scpSession == NULL) { failf(data, "Failure initialising ssh session\n"); + Curl_safefree(scp->path); return CURLE_FAILED_INIT; } #ifdef CURL_LIBSSH2_DEBUG @@ -302,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"); + Curl_safefree(scp->path); return CURLE_FAILED_INIT; } @@ -393,6 +395,7 @@ CURLcode Curl_scp_connect(struct connectdata *conn, bool *done) if (!authed) { failf(data, "Authentication failure\n"); + Curl_safefree(scp->path); return CURLE_FAILED_INIT; } |