stream_frame_new(): Add missing allocation check

Reported by Marc Schönefeld.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19794)
This commit is contained in:
Tomas Mraz 2023-03-01 10:28:58 +01:00
parent 7fa216095a
commit bf762f9203

View File

@ -29,6 +29,9 @@ static STREAM_FRAME *stream_frame_new(UINT_RANGE *range, OSSL_QRX_PKT *pkt,
{
STREAM_FRAME *sf = OPENSSL_zalloc(sizeof(*sf));
if (sf == NULL)
return NULL;
if (pkt != NULL)
ossl_qrx_pkt_up_ref(pkt);