GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — SslHandler: Fix possible buffer leak when an OOME is thrown during al… · netty/netty@64ac5ab

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • handler/src/main/java/io/netty/handler/ssl
    • SslHandler.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎handler/src/main/java/io/netty/handler/ssl/SslHandler.java‎

Copy file name to clipboardExpand all lines: handler/src/main/java/io/netty/handler/ssl/SslHandler.java
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -885,10 +885,10 @@ private void wrap(ChannelHandlerContext ctx, boolean inUnwrap) throws SSLExcepti
885885
}
886886
result = wrap(alloc, engine, buf, out);
887887
}
888-
} catch (SSLException e) {
889-
// Either wrapMultiple(...) or wrap(...) did throw. In this case we need to release the buffer
890-
// that we removed from pendingUnencryptedWrites before failing the promise and rethrowing it.
891-
// Failing to do so would result in a buffer leak.
888+
} catch (Throwable e) {
889+
// Either wrapMultiple(...), wrap(...) or allocateOutNetBuf(...) did throw.
890+
// In this case we need to release the buffer that we removed from pendingUnencryptedWrites
891+
// before failing the promise and rethrowing it. Failing to do so would result in a buffer leak.
892892
// See https://github.com/netty/netty/issues/14644
893893
//
894894
// We don't need to release out here as this is done in a finally block already.

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.