When using the multi interface and a handle using SFTP was removed very
early on, we would get a segfault due to the code assumed data was there
that hadn't yet been setup.
Bug: http://curl.haxx.se/mail/lib-2011-03/0066.html
Reported by: Saqib Ali
}
sshc->sftp_handle = NULL;
}
- Curl_safefree(sftp_scp->path);
- sftp_scp->path = NULL;
+ if(sftp_scp) {
+ Curl_safefree(sftp_scp->path);
+ sftp_scp->path = NULL;
+ }
DEBUGF(infof(data, "SFTP DONE done\n"));
#if 0 /* PREV */
else
result = status;
- Curl_safefree(sftp_scp->path);
- sftp_scp->path = NULL;
+ if(sftp_scp) {
+ Curl_safefree(sftp_scp->path);
+ sftp_scp->path = NULL;
+ }
Curl_pgrsDone(conn);
conn->data->req.keepon = 0; /* clear all bits */