[td-11818] fix crash in create database.

This commit is contained in:
Haojun Liao 2022-01-06 11:16:26 +08:00
parent b00bc84157
commit 4725b4e020
2 changed files with 4 additions and 4 deletions

View File

@ -104,8 +104,8 @@ typedef struct SSchJob {
SHashObj *succTasks; // succeed tasks, key:taskid, value:SQueryTask*
SHashObj *failTasks; // failed tasks, key:taskid, value:SQueryTask*
SArray *levels; // Element is SQueryLevel, starting from 0.
SArray *subPlans; // Element is SArray*, and nested element is SSubplan. The execution level of subplan, starting from 0.
SArray *levels; // Element is SQueryLevel, starting from 0. SArray<SSchLevel>
SArray *subPlans; // Element is SArray*, and nested element is SSubplan. The execution level of subplan, starting from 0. SArray<void*>
SQueryProfileSummary summary;
} SSchJob;

View File

@ -1070,8 +1070,8 @@ void scheduleFreeJob(void *pJob) {
schDropJobAllTasks(job);
}
taosArrayDestroy(job->subPlans);
job->subPlans = NULL; // it is a reference to pDag->pSubplans
int32_t numOfLevels = taosArrayGetSize(job->levels);
for(int32_t i = 0; i < numOfLevels; ++i) {
SSchLevel *pLevel = taosArrayGet(job->levels, i);