enh: free cursor if it is not a null pointer.

This commit is contained in:
Haojun Liao 2022-05-24 23:10:51 +08:00
parent 2dd4d90512
commit 3ac134adbe
2 changed files with 3 additions and 3 deletions

View File

@ -660,8 +660,7 @@ typedef struct {
int32_t tz; // query client timezone
char intervalUnit;
char slidingUnit;
char
offsetUnit; // TODO Remove it, the offset is the number of precision tickle, and it must be a immutable duration.
char offsetUnit;
int8_t precision;
int64_t interval;
int64_t sliding;

View File

@ -1031,8 +1031,9 @@ static void destroySysScanOperator(void* param, int32_t numOfOutput) {
blockDataDestroy(pInfo->pRes);
const char* name = tNameGetTableName(&pInfo->name);
if (strncasecmp(name, TSDB_INS_TABLE_USER_TABLES, TSDB_TABLE_FNAME_LEN) == 0) {
if (strncasecmp(name, TSDB_INS_TABLE_USER_TABLES, TSDB_TABLE_FNAME_LEN) == 0 || pInfo->pCur != NULL) {
metaCloseTbCursor(pInfo->pCur);
pInfo->pCur = NULL;
}
taosArrayDestroy(pInfo->scanCols);