This is an automated email from the ASF dual-hosted git repository. lizhanhui pushed a commit to branch free_direct_byte_buffer in repository https://gitbox.apache.org/repos/asf/rocketmq.git
The following commit(s) were added to refs/heads/free_direct_byte_buffer by this push: new dd2f6695f5 Guard against null dd2f6695f5 is described below commit dd2f6695f579ccba83cf548289bc89a6dfb9298b Author: Li Zhanhui <lizhan...@gmail.com> AuthorDate: Fri Nov 10 17:41:02 2023 +0800 Guard against null Signed-off-by: Li Zhanhui <lizhan...@gmail.com> --- common/src/main/java/org/apache/rocketmq/common/UtilAll.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/src/main/java/org/apache/rocketmq/common/UtilAll.java b/common/src/main/java/org/apache/rocketmq/common/UtilAll.java index d017791f8e..2808f106ae 100644 --- a/common/src/main/java/org/apache/rocketmq/common/UtilAll.java +++ b/common/src/main/java/org/apache/rocketmq/common/UtilAll.java @@ -700,6 +700,9 @@ public class UtilAll { } public static void cleanBuffer(final ByteBuffer buffer) { + if (null == buffer) { + return; + } PlatformDependent.freeDirectBuffer(buffer); }