From 69ed026c3438d609c21c8dd7b4217eea504945a5 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Thu, 21 May 2020 07:15:57 +0000 Subject: [PATCH] fix memory leak in TSDB --- src/tsdb/src/tsdbMeta.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tsdb/src/tsdbMeta.c b/src/tsdb/src/tsdbMeta.c index 356e9c77f1..950dde97d8 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); } -- GitLab