From 5d485f0ca5d500f782144ad263410d8ea1ebb3c8 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 336b87551ae8a..15735c07c890a 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 @@ -76,6 +76,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