2
0
mirror of https://github.com/boostorg/asio.git synced 2026-01-19 04:02:09 +00:00

Fix memory leak in ssl::detail::engine move assignment.

This commit is contained in:
Christopher Kohlhoff
2025-11-04 23:43:08 +11:00
parent f49a0add53
commit 87f5778434

View File

@@ -101,6 +101,12 @@ engine& engine::operator=(engine&& other) noexcept
{
if (this != &other)
{
if (ssl_ && SSL_get_app_data(ssl_))
{
delete static_cast<verify_callback_base*>(SSL_get_app_data(ssl_));
SSL_set_app_data(ssl_, 0);
}
if (ext_bio_)
::BIO_free(ext_bio_);