ops, wrong patch attached.
So, only Curl_scp_send and Curl_sftp_send need the check, recv's functions error handled good in sendf.c
ops, wrong patch attached.
So, only Curl_scp_send and Curl_sftp_send need the check, recv's functions error handled good in sendf.c