fix(stream): fix invalid read.
This commit is contained in:
parent
619a9f6d08
commit
0f5f21ba09
|
@ -342,6 +342,13 @@ void tFreeStreamTask(SStreamTask* pTask) {
|
||||||
walCloseReader(pTask->exec.pWalReader);
|
walCloseReader(pTask->exec.pWalReader);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pTask->pReadyMsgList = taosArrayDestroy(pTask->pReadyMsgList);
|
||||||
|
if (pTask->msgInfo.pData != NULL) {
|
||||||
|
destroyDispatchMsg(pTask->msgInfo.pData, getNumOfDispatchBranch(pTask));
|
||||||
|
pTask->msgInfo.pData = NULL;
|
||||||
|
pTask->msgInfo.dispatchMsgType = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (pTask->outputInfo.type == TASK_OUTPUT__TABLE) {
|
if (pTask->outputInfo.type == TASK_OUTPUT__TABLE) {
|
||||||
tDeleteSchemaWrapper(pTask->tbSink.pSchemaWrapper);
|
tDeleteSchemaWrapper(pTask->tbSink.pSchemaWrapper);
|
||||||
taosMemoryFree(pTask->tbSink.pTSchema);
|
taosMemoryFree(pTask->tbSink.pTSchema);
|
||||||
|
@ -356,13 +363,6 @@ void tFreeStreamTask(SStreamTask* pTask) {
|
||||||
streamStateClose(pTask->pState, status == TASK_STATUS__DROPPING);
|
streamStateClose(pTask->pState, status == TASK_STATUS__DROPPING);
|
||||||
}
|
}
|
||||||
|
|
||||||
pTask->pReadyMsgList = taosArrayDestroy(pTask->pReadyMsgList);
|
|
||||||
if (pTask->msgInfo.pData != NULL) {
|
|
||||||
destroyDispatchMsg(pTask->msgInfo.pData, getNumOfDispatchBranch(pTask));
|
|
||||||
pTask->msgInfo.pData = NULL;
|
|
||||||
pTask->msgInfo.dispatchMsgType = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pTask->id.idStr != NULL) {
|
if (pTask->id.idStr != NULL) {
|
||||||
taosMemoryFree((void*)pTask->id.idStr);
|
taosMemoryFree((void*)pTask->id.idStr);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue