Merge pull request #27721 from taosdata/fix/TD-31915
fix(tsdb/file2): free fobj if appending failed
This commit is contained in:
commit
6722b7788c
|
@ -50,7 +50,11 @@ static int32_t tsdbSttLvlInitEx(STsdb *pTsdb, const SSttLvl *lvl1, SSttLvl **lvl
|
|||
}
|
||||
|
||||
code = TARRAY2_APPEND(lvl[0]->fobjArr, fobj);
|
||||
if (code) return code;
|
||||
if (code) {
|
||||
(void)tsdbSttLvlClear(lvl);
|
||||
taosMemoryFree(fobj);
|
||||
return code;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue