vtls_scache: fix possible null ptr deref

Pointed out by CodeSonar. It is probably not reachable, but might as
well just add a precaution.

Closes #15950
This commit is contained in:
Daniel Stenberg 2025-01-09 08:31:32 +01:00
parent 779908df43
commit a19b759dea
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -783,7 +783,7 @@ out:
"quic_tp=%s], peer has %zu sessions now",
ssl_peer_key, s->ietf_tls_id, s->valid_until - now,
s->alpn, s->earlydata_max, s->quic_tp ? "yes" : "no",
Curl_llist_count(&peer->sessions));
peer ? Curl_llist_count(&peer->sessions) : 0);
return result;
}