From 95e08bc907eebbe0cc363b110eacf0cfe07eb5c9 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 1 Nov 2025 14:40:49 +0000 Subject: Remove a long-obsolete workaround from ssl_openssl. --- src/modules/extra/m_ssl_openssl.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index 36dac31c4..67c334efd 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -501,14 +501,6 @@ namespace OpenSSL return 1; } - static int destroy(BIO* bio) - { - // XXX: Dummy function to avoid a memory leak in OpenSSL. - // The memory leak happens in BIO_free() (bio_lib.c) when the destroy func of the BIO is NULL. - // This is fixed in OpenSSL but some distros still ship the unpatched version hence we provide this workaround. - return 1; - } - static long ctrl(BIO* bio, int cmd, long num, void* ptr) { if (cmd == BIO_CTRL_FLUSH) @@ -528,7 +520,6 @@ namespace OpenSSL BIO_meth_set_read(meth, OpenSSL::BIOMethod::read); BIO_meth_set_ctrl(meth, OpenSSL::BIOMethod::ctrl); BIO_meth_set_create(meth, OpenSSL::BIOMethod::create); - BIO_meth_set_destroy(meth, OpenSSL::BIOMethod::destroy); return meth; } } -- cgit v1.3.1-10-gc9f91