From 0fb0da60c31737dc57777655ed320fe66db1cd9a Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Tue, 19 Oct 2021 14:51:12 +0800 Subject: [PATCH] fix bug if add table into metaindex error --- src/tsdb/src/tsdbMeta.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tsdb/src/tsdbMeta.c b/src/tsdb/src/tsdbMeta.c index ec45cdf1be..1dd58235e7 100644 --- a/src/tsdb/src/tsdbMeta.c +++ b/src/tsdb/src/tsdbMeta.c @@ -121,11 +121,13 @@ int tsdbCreateTable(STsdbRepo *repo, STableCfg *pCfg) { if (newSuper) { if (tsdbAddTableToMeta(pRepo, super, true, false) < 0) { tsdbUnlockRepoMeta(pRepo); + super = NULL; goto _err; } } if (tsdbAddTableToMeta(pRepo, table, true, false) < 0) { tsdbUnlockRepoMeta(pRepo); + table = NULL; goto _err; } tsdbUnlockRepoMeta(pRepo); -- GitLab