ngtcp2/osslq: remove NULL pointer dereferences

If data is NULL, then it does not make sense to pass it to failf.

Closes #14701
This commit is contained in:
mbuhl 2024-08-27 12:38:31 +02:00 committed by Daniel Stenberg
parent 8dd0cb73a2
commit 8fe1f562bf
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
2 changed files with 2 additions and 6 deletions

View File

@ -226,10 +226,8 @@ static CURLcode h3_data_setup(struct Curl_cfilter *cf,
struct cf_ngtcp2_ctx *ctx = cf->ctx;
struct h3_stream_ctx *stream = H3_STREAM_CTX(ctx, data);
if(!data) {
failf(data, "initialization failure, transfer not http initialized");
if(!data)
return CURLE_FAILED_INIT;
}
if(stream)
return CURLE_OK;

View File

@ -612,10 +612,8 @@ static CURLcode h3_data_setup(struct Curl_cfilter *cf,
struct cf_osslq_ctx *ctx = cf->ctx;
struct h3_stream_ctx *stream = H3_STREAM_CTX(ctx, data);
if(!data) {
failf(data, "initialization failure, transfer not http initialized");
if(!data)
return CURLE_FAILED_INIT;
}
if(stream)
return CURLE_OK;