Merge pull request #28171 from taosdata/fix/TD-32337-3.0

fix: memory leak when alloc error occurs
This commit is contained in:
Hongze Cheng 2024-09-29 14:03:36 +08:00 committed by GitHub
commit d948b59e5e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -71,6 +71,9 @@ static int32_t tsdbSttLvlInitRef(STsdb *pTsdb, const SSttLvl *lvl1, SSttLvl **lv
}
code = TARRAY2_APPEND(lvl[0]->fobjArr, fobj1);
if (code) {
if (tsdbTFileObjUnref(fobj1) != 0) {
tsdbError("failed to unref file obj, fobj:%p", fobj1);
}
tsdbSttLvlClear(lvl);
return code;
}