mirror of
https://github.com/curl/curl.git
synced 2026-06-04 11:44:15 +03:00
libssh: Remove free done for sftp_send_aio for successful write
libssh's sftp_aio_wait_write() would free the sftp_aio and assign NULL to the variable storing it in case of success and error (not in case of SSH_AGAIN). Hence freeing sftp_send_aio and assigning it NULL is not needed in case of successful sftp_aio_wait_write() due to which this commit removes that code. Signed-off-by: Eshan Kelkar <eshankelkar@galorithm.com>
This commit is contained in:
parent
91278dec41
commit
b81d51e904
1 changed files with 7 additions and 4 deletions
|
|
@ -3047,10 +3047,13 @@ static CURLcode sftp_send(struct Curl_easy *data, int sockindex,
|
|||
return CURLE_AGAIN;
|
||||
else if(nwrite < 0)
|
||||
return CURLE_SEND_ERROR;
|
||||
if(sshc->sftp_send_aio) {
|
||||
sftp_aio_free(sshc->sftp_send_aio);
|
||||
sshc->sftp_send_aio = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* sftp_aio_wait_write() would free sftp_send_aio and
|
||||
* assign it NULL in all cases except when it returns
|
||||
* SSH_AGAIN.
|
||||
*/
|
||||
|
||||
sshc->sftp_send_state = 0;
|
||||
*pnwritten = (size_t)nwrite;
|
||||
return CURLE_OK;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue