]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
QUIC RSTREAM: Allow pointer to be NULL when calling free
authorHugo Landau <hlandau@openssl.org>
Mon, 31 Oct 2022 15:45:54 +0000 (15:45 +0000)
committerHugo Landau <hlandau@openssl.org>
Fri, 13 Jan 2023 13:20:12 +0000 (13:20 +0000)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19703)

ssl/quic/quic_rstream.c

index f8ad8b89de1040bc0163fd536ae0cf4e111844e3..669f8d20da6b23bfd536d2f768bdb359e3cf81e2 100644 (file)
@@ -33,6 +33,9 @@ QUIC_RSTREAM *ossl_quic_rstream_new(QUIC_RXFC *rxfc,
 
 void ossl_quic_rstream_free(QUIC_RSTREAM *qrs)
 {
+    if (qrs == NULL)
+        return;
+
     ossl_sframe_list_destroy(&qrs->fl);
     OPENSSL_free(qrs);
 }