diff --git a/src/tsdb/src/tsdbMeta.c b/src/tsdb/src/tsdbMeta.c index 356e9c77f13bb2402ed8d5a83cd17083d4e4bfb8..950dde97d8bb5dac73bffb3ea83daee35aece66d 100644 --- a/src/tsdb/src/tsdbMeta.c +++ b/src/tsdb/src/tsdbMeta.c @@ -316,7 +316,7 @@ int tsdbCreateTable(TsdbRepoT *repo, STableCfg *pCfg) { // index the first tag column STColumn* pColSchema = schemaColAt(super->tagSchema, 0); super->pIndex = tSkipListCreate(TSDB_SUPER_TABLE_SL_LEVEL, pColSchema->type, pColSchema->bytes, - 1, 0, 0, getTagIndexKey); // Allow duplicate key, no lock + 1, 0, 1, getTagIndexKey); // Allow duplicate key, no lock if (super->pIndex == NULL) { tdFreeSchema(super->schema); @@ -440,6 +440,7 @@ static int tsdbFreeTable(STable *pTable) { // Free content if (TSDB_TABLE_IS_SUPER_TABLE(pTable)) { + tdFreeSchema(pTable->tagSchema); tSkipListDestroy(pTable->pIndex); }