fix memory leak in TSDB
This commit is contained in:
parent
28a9276105
commit
69ed026c34
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue