From 67e0d7b3ba6c0860e6ce4cd13052d061f42eb986 Mon Sep 17 00:00:00 2001 From: dog Date: Wed, 6 Nov 2024 10:01:51 +0800 Subject: [PATCH] fix: use-after-free when remove pipeline but not clear flusher pointer (#1859) --- core/pipeline/Pipeline.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/pipeline/Pipeline.cpp b/core/pipeline/Pipeline.cpp index 7be446e4cf..40dec54bd6 100644 --- a/core/pipeline/Pipeline.cpp +++ b/core/pipeline/Pipeline.cpp @@ -431,9 +431,7 @@ void Pipeline::Stop(bool isRemoving) { ProcessQueueManager::GetInstance()->DisablePop(mName, isRemoving); WaitAllItemsInProcessFinished(); - if (!isRemoving) { - FlushBatch(); - } + FlushBatch(); if (!mGoPipelineWithoutInput.isNull()) { // Go pipeline `Stop` will stop and delete