h3: fix query of concurrent streams

Queries gave wrong value or ran into NULL pointers when called at
times when connection filter was not fully initialized.

Closes #17886
This commit is contained in:
Stefan Eissing 2025-07-10 13:18:03 +02:00 committed by Daniel Stenberg
parent 74a94e699a
commit 695eee432f
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 5 additions and 4 deletions

View file

@ -2750,7 +2750,7 @@ static CURLcode cf_h2_query(struct Curl_cfilter *cf,
DEBUGASSERT(pres1);
CF_DATA_SAVE(save, cf, data);
if(nghttp2_session_check_request_allowed(ctx->h2) == 0) {
if(!ctx->h2 || !nghttp2_session_check_request_allowed(ctx->h2)) {
/* the limit is what we have in use right now */
effective_max = CONN_ATTACHED(cf->conn);
}