mirror of
https://github.com/curl/curl.git
synced 2026-07-09 02:37:15 +03:00
schannel: clean up better on Curl_conn_cf_send() error
Fixes #19241 Reported-by: Joshua Rogers
This commit is contained in:
parent
fb0c014e30
commit
7bfc2b8a54
1 changed files with 10 additions and 7 deletions
|
|
@ -1128,7 +1128,7 @@ schannel_connect_step2(struct Curl_cfilter *cf, struct Curl_easy *data)
|
|||
SecBuffer inbuf[2];
|
||||
SecBufferDesc inbuf_desc;
|
||||
SECURITY_STATUS sspi_status = SEC_E_OK;
|
||||
CURLcode result;
|
||||
CURLcode result = CURLE_OK;
|
||||
bool doread;
|
||||
const char *pubkey_ptr;
|
||||
|
||||
|
|
@ -1301,15 +1301,18 @@ schannel_connect_step2(struct Curl_cfilter *cf, struct Curl_easy *data)
|
|||
if(result || (outbuf[i].cbBuffer != written)) {
|
||||
failf(data, "schannel: failed to send next handshake data: "
|
||||
"sent %zu of %lu bytes", written, outbuf[i].cbBuffer);
|
||||
return CURLE_SSL_CONNECT_ERROR;
|
||||
result = CURLE_SSL_CONNECT_ERROR;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* free obsolete buffer */
|
||||
if(outbuf[i].pvBuffer) {
|
||||
Curl_pSecFn->FreeContextBuffer(outbuf[i].pvBuffer);
|
||||
}
|
||||
}
|
||||
for(i = 0; i < 3; i++) {
|
||||
/* free obsolete buffer */
|
||||
if(outbuf[i].pvBuffer)
|
||||
Curl_pSecFn->FreeContextBuffer(outbuf[i].pvBuffer);
|
||||
}
|
||||
if(result)
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
char buffer[STRERROR_LEN];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue