You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2023/01/13 04:17:46 UTC

[doris] 01/03: [fix](sink) fix memory leak in VNodeChannel (#15834) (#15835)

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

morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git

commit b8c7b0a83596703c54bcc3cf8875b271209adcc7
Author: zhengyu <fr...@gmail.com>
AuthorDate: Thu Jan 12 09:24:51 2023 +0800

    [fix](sink) fix memory leak in VNodeChannel (#15834) (#15835)
    
    Signed-off-by: freemandealer <fr...@gmail.com>
    
    Signed-off-by: freemandealer <fr...@gmail.com>
---
 be/src/vec/sink/vtablet_sink.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/be/src/vec/sink/vtablet_sink.cpp b/be/src/vec/sink/vtablet_sink.cpp
index 7d01bf3105..5f165ae80e 100644
--- a/be/src/vec/sink/vtablet_sink.cpp
+++ b/be/src/vec/sink/vtablet_sink.cpp
@@ -37,6 +37,12 @@ VNodeChannel::VNodeChannel(OlapTableSink* parent, IndexChannel* index_channel, i
 }
 
 VNodeChannel::~VNodeChannel() {
+    if (_open_closure != nullptr) {
+        if (_open_closure->unref()) {
+            delete _open_closure;
+        }
+        _open_closure = nullptr;
+    }
     if (_add_block_closure != nullptr) {
         delete _add_block_closure;
         _add_block_closure = nullptr;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org