From c23a04f8a0ae129f6516d6d41ed9083cb843fea1 Mon Sep 17 00:00:00 2001 From: Theo Buehler Date: Tue, 30 Aug 2022 18:23:41 +0000 Subject: Plug leak of BIO in tls13_quic_init() If rbio and wbio are the same, SSL_free() only frees one BIO, so the BIO_up_ref() before SSL_set_bio() leads to a leak. ok jsing --- lib/libssl/tls13_quic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/libssl') diff --git a/lib/libssl/tls13_quic.c b/lib/libssl/tls13_quic.c index 92bbb011c82..bb7317d4c51 100644 --- a/lib/libssl/tls13_quic.c +++ b/lib/libssl/tls13_quic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls13_quic.c,v 1.5 2022/08/27 09:12:55 jsing Exp $ */ +/* $OpenBSD: tls13_quic.c,v 1.6 2022/08/30 18:23:40 tb Exp $ */ /* * Copyright (c) 2022 Joel Sing * @@ -175,7 +175,6 @@ tls13_quic_init(struct tls13_ctx *ctx) if ((bio = BIO_new(BIO_s_null())) == NULL) return 0; - BIO_up_ref(bio); SSL_set_bio(ctx->ssl, bio, bio); bio = NULL; -- cgit v1.2.3