Merge pull request #28377 from taosdata/fix/TD-32564-3.0
fix(query)[TD-32564]. Fix memory leak in exceptional cases
This commit is contained in:
commit
95f25cf311
|
@ -602,14 +602,14 @@ int32_t tsdbTFileSetInitRef(STsdb *pTsdb, const STFileSet *fset1, STFileSet **fs
|
||||||
SSttLvl *lvl;
|
SSttLvl *lvl;
|
||||||
code = tsdbSttLvlInitRef(pTsdb, lvl1, &lvl);
|
code = tsdbSttLvlInitRef(pTsdb, lvl1, &lvl);
|
||||||
if (code) {
|
if (code) {
|
||||||
taosMemoryFree(lvl);
|
tsdbSttLvlClear(&lvl);
|
||||||
tsdbTFileSetClear(fset);
|
tsdbTFileSetClear(fset);
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
code = TARRAY2_APPEND(fset[0]->lvlArr, lvl);
|
code = TARRAY2_APPEND(fset[0]->lvlArr, lvl);
|
||||||
if (code) {
|
if (code) {
|
||||||
taosMemoryFree(lvl);
|
tsdbSttLvlClear(&lvl);
|
||||||
tsdbTFileSetClear(fset);
|
tsdbTFileSetClear(fset);
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue