From 1781ee773197747004f68af574f1358c3b21fbfa Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Tue, 30 Aug 2022 15:39:35 +0300 Subject: [PATCH] Avoid leaking memory in SseParser Relates to: #23997 --- .../java/org/jboss/resteasy/reactive/client/impl/SseParser.java | 1 + 1 file changed, 1 insertion(+) diff --git a/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/SseParser.java b/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/SseParser.java index 82e58490b60a3..e503570b36274 100644 --- a/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/SseParser.java +++ b/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/SseParser.java @@ -78,6 +78,7 @@ public void setSseContentTypeHeader(String sseContentTypeHeader) { @Override public void handle(Buffer event) { byte[] newBytes = event.getBytes(); + event.getByteBuf().release(); // check if we have partial data remaining if (bytes != null) { // concat old and new data