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:
parent
8dd0cb73a2
commit
8fe1f562bf
@ -226,10 +226,8 @@ static CURLcode h3_data_setup(struct Curl_cfilter *cf,
|
|||||||
struct cf_ngtcp2_ctx *ctx = cf->ctx;
|
struct cf_ngtcp2_ctx *ctx = cf->ctx;
|
||||||
struct h3_stream_ctx *stream = H3_STREAM_CTX(ctx, data);
|
struct h3_stream_ctx *stream = H3_STREAM_CTX(ctx, data);
|
||||||
|
|
||||||
if(!data) {
|
if(!data)
|
||||||
failf(data, "initialization failure, transfer not http initialized");
|
|
||||||
return CURLE_FAILED_INIT;
|
return CURLE_FAILED_INIT;
|
||||||
}
|
|
||||||
|
|
||||||
if(stream)
|
if(stream)
|
||||||
return CURLE_OK;
|
return CURLE_OK;
|
||||||
|
|||||||
@ -612,10 +612,8 @@ static CURLcode h3_data_setup(struct Curl_cfilter *cf,
|
|||||||
struct cf_osslq_ctx *ctx = cf->ctx;
|
struct cf_osslq_ctx *ctx = cf->ctx;
|
||||||
struct h3_stream_ctx *stream = H3_STREAM_CTX(ctx, data);
|
struct h3_stream_ctx *stream = H3_STREAM_CTX(ctx, data);
|
||||||
|
|
||||||
if(!data) {
|
if(!data)
|
||||||
failf(data, "initialization failure, transfer not http initialized");
|
|
||||||
return CURLE_FAILED_INIT;
|
return CURLE_FAILED_INIT;
|
||||||
}
|
|
||||||
|
|
||||||
if(stream)
|
if(stream)
|
||||||
return CURLE_OK;
|
return CURLE_OK;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user