From 6c6a66e5b32b6a66d47d648f1041c1f8100a50c2 Mon Sep 17 00:00:00 2001 From: Nikolay Shaplov Date: Sun, 5 Jan 2025 17:49:30 +0300 Subject: [PATCH] Fix memory leaks in t/local/46_msg_callback.t --- t/local/46_msg_callback.t | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/t/local/46_msg_callback.t b/t/local/46_msg_callback.t index 587e5a0e..426fdb74 100644 --- a/t/local/46_msg_callback.t +++ b/t/local/46_msg_callback.t @@ -36,6 +36,8 @@ my $server = tcp_socket(); for(1,2) { last if Net::SSLeay::shutdown($ssl)>0; } + Net::SSLeay::free($ssl); # Call SSL_free(); + Net::SSLeay::CTX_free($ctx); close($cl) || die("server close: $!"); } $server->close() || die("server listen socket close: $!"); @@ -88,6 +90,8 @@ sub client { for(1,2) { last if Net::SSLeay::shutdown($ssl)>0; } + Net::SSLeay::free($ssl); # Call SSL_free(); + Net::SSLeay::CTX_free($ctx); close($cl) || die("client close: $!"); ok(scalar(@states) > 1, "at least 2 messages logged: $where");