aboutsummaryrefslogtreecommitdiff
path: root/lib/ssh.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ssh.c')
-rw-r--r--lib/ssh.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/ssh.c b/lib/ssh.c
index 25500a101..2587516f0 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -1846,10 +1846,9 @@ static CURLcode Curl_ssh_connect(struct connectdata *conn, bool *done)
CURLcode result;
struct SessionHandle *data = conn->data;
- if (data->reqdata.proto.ssh) {
- Curl_safefree(data->reqdata.proto.ssh);
- data->reqdata.proto.ssh = NULL;
- }
+ /* If there already is a protocol-specific struct allocated for this
+ sessionhandle, deal with it */
+ Curl_reset_reqproto(conn);
result = ssh_init(conn);
if (result)