diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index 4b154af0d6..d408883769 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -1303,7 +1303,9 @@ static int32_t getTableScannerExecInfo(struct SOperatorInfo* pOptr, void** pOptr static void destroyTableScanBase(STableScanBase* pBase, TsdReader* pAPI) { cleanupQueryTableDataCond(&pBase->cond); - pAPI->tsdReaderClose(pBase->dataReader); + if (pAPI->tsdReaderClose) { + pAPI->tsdReaderClose(pBase->dataReader); + } pBase->dataReader = NULL; if (pBase->matchInfo.pList != NULL) {