curl_schannel.c: Fixed possible memory or handle leak
First try to fix possible memory leaks, in this case: Only connssl->ctxt xor onnssl->cred being initialized.
This commit is contained in:
@@ -1145,6 +1145,7 @@ int Curl_schannel_shutdown(struct connectdata *conn, int sockindex)
|
|||||||
" (bytes written: %zd)\n", curl_easy_strerror(code), written);
|
" (bytes written: %zd)\n", curl_easy_strerror(code), written);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* free SSPI Schannel API security context handle */
|
/* free SSPI Schannel API security context handle */
|
||||||
if(connssl->ctxt) {
|
if(connssl->ctxt) {
|
||||||
@@ -1169,7 +1170,6 @@ int Curl_schannel_shutdown(struct connectdata *conn, int sockindex)
|
|||||||
Curl_safefree(connssl->cred);
|
Curl_safefree(connssl->cred);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* free internal buffer for received encrypted data */
|
/* free internal buffer for received encrypted data */
|
||||||
if(connssl->encdata_buffer != NULL) {
|
if(connssl->encdata_buffer != NULL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user