fix(tsdb/file2): free fobj if appending failed

This commit is contained in:
Minglei Jin 2024-09-06 14:47:50 +08:00
parent b92dcea9fb
commit 0614bc47a8
1 changed files with 4 additions and 1 deletions

View File

@ -50,7 +50,10 @@ static int32_t tsdbSttLvlInitEx(STsdb *pTsdb, const SSttLvl *lvl1, SSttLvl **lvl
}
code = TARRAY2_APPEND(lvl[0]->fobjArr, fobj);
if (code) return code;
if (code) {
taosMemoryFree(fobj);
return code;
}
}
return 0;
}