Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23334)
=head1 COPYRIGHT
-Copyright 2022-2024 The OpenSSL Project Authors. All Rights Reserved.
+Copyright 2024 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use
this file except in compliance with the License. You can obtain a copy
ossl_quic_channel_free(qc->ch);
qc->ch = NULL;
- ossl_quic_port_free(qc->port);
- qc->port = NULL;
+ if (qc->port != NULL) {
+ BIO *b;
+
+ b = ossl_quic_port_get_net_rbio(qc->port);
+ BIO_free_all(b);
+
+ b = ossl_quic_port_get_net_wbio(qc->port);
+ BIO_free_all(b);
+
+ ossl_quic_port_free(qc->port);
+ qc->port = NULL;
+ }
ossl_quic_engine_free(qc->engine);
qc->engine = NULL;