This is an automated email from the ASF dual-hosted git repository. lhotari pushed a commit to branch branch-4.0 in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit c6419a958b5e910de3d1db95f4a5e8e96c0b1ee5 Author: Lari Hotari <lhot...@users.noreply.github.com> AuthorDate: Thu May 8 13:41:44 2025 +0300 [fix][misc] Fix ByteBuf leak in SchemaUtils (#24274) (cherry picked from commit 8ecf0d6aec7c49e768db1927ab5088df780aa60f) --- .../src/main/java/org/apache/pulsar/client/impl/schema/SchemaUtils.java | 1 + 1 file changed, 1 insertion(+) diff --git a/pulsar-common/src/main/java/org/apache/pulsar/client/impl/schema/SchemaUtils.java b/pulsar-common/src/main/java/org/apache/pulsar/client/impl/schema/SchemaUtils.java index 2ed08af0681..dcc73d1d21f 100644 --- a/pulsar-common/src/main/java/org/apache/pulsar/client/impl/schema/SchemaUtils.java +++ b/pulsar-common/src/main/java/org/apache/pulsar/client/impl/schema/SchemaUtils.java @@ -370,6 +370,7 @@ public final class SchemaUtils { ByteBuf byteBuf = PulsarByteBufAllocator.DEFAULT.heapBuffer(dataLength); byteBuf.writeInt(keyBytes.length).writeBytes(keyBytes).writeInt(valueBytes.length).writeBytes(valueBytes); byteBuf.readBytes(schema); + byteBuf.release(); return schema; }