fix memory leak.

Signed-off-by: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com>
This commit is contained in:
Pratik Mankawde
2026-01-28 14:49:40 +00:00
parent 7612c1af0c
commit ca99e40290
2 changed files with 7 additions and 1 deletions

View File

@@ -4,7 +4,7 @@
# These are false positives from Boost.Asio SSL internals that use OpenSSL BIO structures.
# The BIO structures are managed by OpenSSL's internal reference counting and freed at process exit.
leak:boost::asio
#leak:boost::asio
#leak:boost/asio
# OpenSSL BIO memory is managed internally and freed at process exit

View File

@@ -278,6 +278,9 @@ TEST(HTTPClient, basic_http_request)
EXPECT_FALSE(result_error);
EXPECT_EQ(result_status, 200);
EXPECT_EQ(result_data, test_body);
// Clean up SSL context to prevent memory leaks
HTTPClient::cleanupSSLContext();
}
TEST(HTTPClient, empty_response)
@@ -298,6 +301,9 @@ TEST(HTTPClient, empty_response)
EXPECT_FALSE(result_error);
EXPECT_EQ(result_status, 200);
EXPECT_TRUE(result_data.empty());
// Clean up SSL context to prevent memory leaks
HTTPClient::cleanupSSLContext();
}
TEST(HTTPClient, different_status_codes)