From 23c1aa2db094765b2118d9cdf43e7f9446868666 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Mon, 15 May 2023 17:55:37 +0800 Subject: [PATCH] fix: fix multithread issue in destroyTimesliceOperator --- source/libs/executor/src/timesliceoperator.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/libs/executor/src/timesliceoperator.c b/source/libs/executor/src/timesliceoperator.c index d56595dae9..c59669fc53 100644 --- a/source/libs/executor/src/timesliceoperator.c +++ b/source/libs/executor/src/timesliceoperator.c @@ -894,8 +894,10 @@ void destroyTimeSliceOperatorInfo(void* param) { } taosArrayDestroy(pInfo->pLinearInfo); - taosMemoryFree(pInfo->pPrevGroupKey->pData); - taosMemoryFree(pInfo->pPrevGroupKey); + if (pInfo->pPrevGroupKey) { + taosMemoryFree(pInfo->pPrevGroupKey->pData); + taosMemoryFree(pInfo->pPrevGroupKey); + } cleanupExprSupp(&pInfo->scalarSup);