Skip to content

Auto-port 4.1: Avoid leak in PemReader on OutOfDirectMemoryError#16576

Merged
normanmaurer merged 2 commits into
4.1from
auto-port-pr-16551-to-4.1
Mar 30, 2026
Merged

Auto-port 4.1: Avoid leak in PemReader on OutOfDirectMemoryError#16576
normanmaurer merged 2 commits into
4.1from
auto-port-pr-16551-to-4.1

Conversation

@netty-project-bot

Copy link
Copy Markdown
Contributor

Auto-port of #16551 to 4.1
Cherry-picked commit: 35ade4a


Motivation:

Avoid direct buffers leak if exception thrown during PEM file parsing and release unpooled buffers to improve pool metrics

Modification:

  1. on exception, release all already allocated certificates in certs list
  2. release unpooled base64 repr in a finally block

Result:

Fixes #16549

Motivation:

Avoid direct buffers leak if exception thrown during PEM file parsing
and release unpooled buffers to improve pool metrics

Modification:

1. on exception, release all already allocated certificates in `certs`
list
2. release unpooled base64 repr in a finally block

Result:

Fixes #16549

Co-authored-by: Norman Maurer <norman_maurer@apple.com>
(cherry picked from commit 35ade4a)
@normanmaurer normanmaurer added this to the 4.1.133.Final milestone Mar 30, 2026
@normanmaurer normanmaurer merged commit 8eef9c8 into 4.1 Mar 30, 2026
19 checks passed
@normanmaurer normanmaurer deleted the auto-port-pr-16551-to-4.1 branch March 30, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants