Merge pull request #5820 from taosdata/hotfix/TD-3768
[TD-3768]crash issue by query cancelled
This commit is contained in:
commit
b24b0a35d8
|
@ -1879,14 +1879,16 @@ static void doFreeQueryHandle(SQueryRuntimeEnv* pRuntimeEnv) {
|
|||
}
|
||||
|
||||
static void destroyTsComp(SQueryRuntimeEnv *pRuntimeEnv, SQuery *pQuery) {
|
||||
if (isTsCompQuery(pQuery)) {
|
||||
if (isTsCompQuery(pQuery) && pRuntimeEnv->outputBuf && pRuntimeEnv->outputBuf->pDataBlock && taosArrayGetSize(pRuntimeEnv->outputBuf->pDataBlock) > 0) {
|
||||
SColumnInfoData* pColInfoData = taosArrayGet(pRuntimeEnv->outputBuf->pDataBlock, 0);
|
||||
if (pColInfoData) {
|
||||
FILE *f = *(FILE **)pColInfoData->pData; // TODO refactor
|
||||
if (f) {
|
||||
fclose(f);
|
||||
*(FILE **)pColInfoData->pData = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void teardownQueryRuntimeEnv(SQueryRuntimeEnv *pRuntimeEnv) {
|
||||
|
|
Loading…
Reference in New Issue