aboutsummaryrefslogtreecommitdiff
path: root/ssl/bio_ssl.c
diff options
context:
space:
mode:
authorGordon Tetlow <gordon@FreeBSD.org>2024-09-04 03:56:17 +0000
committerGordon Tetlow <gordon@FreeBSD.org>2024-09-04 03:56:17 +0000
commit108164cf95d9594884c2dcccba2691335e6f221b (patch)
tree4e7056d88b26a82672d06a7aca8052b58615ca2f /ssl/bio_ssl.c
parente60dbfd00b009d424dfc5446d132872c93dd0aed (diff)
Diffstat (limited to 'ssl/bio_ssl.c')
-rw-r--r--ssl/bio_ssl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ssl/bio_ssl.c b/ssl/bio_ssl.c
index 401178f0c2e4..be3159b32a9f 100644
--- a/ssl/bio_ssl.c
+++ b/ssl/bio_ssl.c
@@ -1,5 +1,5 @@
/*
- * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-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
@@ -77,7 +77,7 @@ static int ssl_free(BIO *a)
return 0;
bs = BIO_get_data(a);
if (BIO_get_shutdown(a)) {
- if (bs->ssl != NULL)
+ if (bs->ssl != NULL && !SSL_in_init(bs->ssl))
SSL_shutdown(bs->ssl);
if (BIO_get_init(a))
SSL_free(bs->ssl);