This is an automated email from the ASF dual-hosted git repository.

xiaoyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu.git


The following commit(s) were added to refs/heads/master by this push:
     new 71cb3787f7 [type:fix] fix memory overflow (#5407)
71cb3787f7 is described below

commit 71cb3787f77f978d1a15a3f885269d637556610c
Author: 0xmkzt <[email protected]>
AuthorDate: Mon Feb 5 10:26:39 2024 +0800

    [type:fix] fix memory overflow (#5407)
    
    Co-authored-by: dragon-zhang <[email protected]>
---
 .../org/apache/shenyu/plugin/modify/response/ModifyResponsePlugin.java   | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/shenyu-plugin/shenyu-plugin-modify-response/src/main/java/org/apache/shenyu/plugin/modify/response/ModifyResponsePlugin.java
 
b/shenyu-plugin/shenyu-plugin-modify-response/src/main/java/org/apache/shenyu/plugin/modify/response/ModifyResponsePlugin.java
index c4b191928e..652159384b 100644
--- 
a/shenyu-plugin/shenyu-plugin-modify-response/src/main/java/org/apache/shenyu/plugin/modify/response/ModifyResponsePlugin.java
+++ 
b/shenyu-plugin/shenyu-plugin-modify-response/src/main/java/org/apache/shenyu/plugin/modify/response/ModifyResponsePlugin.java
@@ -101,6 +101,7 @@ public class ModifyResponsePlugin extends 
AbstractShenyuPlugin {
             return dataBufferMono.flatMap(dataBuffer -> {
                 byte[] bytes = new byte[dataBuffer.readableByteCount()];
                 dataBuffer.read(bytes);
+                DataBufferUtils.release(dataBuffer);
                 return WebFluxResultUtils.result(this.exchange, 
modifyBody(bytes));
             });
         }

Reply via email to