diff --git a/source/libs/executor/src/eventwindowoperator.c b/source/libs/executor/src/eventwindowoperator.c index 215636a567a517ea7c97535bebdc4fdc49fd06b8..0dbc05ceef46f5a8d2eefa0db12c92f5a971f1d2 100644 --- a/source/libs/executor/src/eventwindowoperator.c +++ b/source/libs/executor/src/eventwindowoperator.c @@ -157,6 +157,20 @@ void destroyEWindowOperatorInfo(void* param) { return; } + if (pInfo->pRow != NULL) { + taosMemoryFree(pInfo->pRow); + } + + if (pInfo->pStartCondInfo != NULL) { + filterFreeInfo(pInfo->pStartCondInfo); + pInfo->pStartCondInfo = NULL; + } + + if (pInfo->pEndCondInfo != NULL) { + filterFreeInfo(pInfo->pEndCondInfo); + pInfo->pEndCondInfo = NULL; + } + cleanupBasicInfo(&pInfo->binfo); colDataDestroy(&pInfo->twAggSup.timeWindowData); @@ -315,4 +329,9 @@ void eventWindowAggImpl(SOperatorInfo* pOperator, SEventWindowOperatorInfo* pInf } } } + + colDataDestroy(ps); + taosMemoryFree(ps); + colDataDestroy(pe); + taosMemoryFree(pe); } diff --git a/tests/script/tsim/query/event.sim b/tests/script/tsim/query/event.sim index c72b7ba12582fd757640138fa06a15b8299d9601..adc94a34decca06f43f4dbc3c2417415ea583214 100644 --- a/tests/script/tsim/query/event.sim +++ b/tests/script/tsim/query/event.sim @@ -36,7 +36,7 @@ endi # child table: single row window print ====> select count(*) from tba1 event_window start with f1 = 0 end with f3 = false; sql select count(*) from tba1 event_window start with f1 = 0 end with f3 = false -if $rows != 1 then +if $rows != 2 then return -1 endi if $data00 != 1 then @@ -62,7 +62,7 @@ endi if $data00 != 2 then return -1 endi -if $data00 != 4 then +if $data10 != 4 then return -1 endi