schannel: add clarifying comment

Explaining how the PVS warning in #10929 is wrong: Dereferencing of the
null pointer 'backend->cred' might take place.

Closes #10931
This commit is contained in:
Daniel Stenberg 2023-04-11 14:40:46 +02:00
parent b1b326ec50
commit 90aea8e2a9
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -1171,9 +1171,11 @@ schannel_connect_step1(struct Curl_cfilter *cf, struct Curl_easy *data)
if(!backend->cred) {
char *snihost;
result = schannel_acquire_credential_handle(cf, data);
if(result != CURLE_OK) {
if(result)
return result;
}
/* schannel_acquire_credential_handle() sets backend->cred accordingly or
it returns error otherwise. */
/* A hostname associated with the credential is needed by
InitializeSecurityContext for SNI and other reasons. */
snihost = Curl_ssl_snihost(data, hostname, NULL);