fix memory leak

This commit is contained in:
Hongze Cheng 2024-04-29 15:21:09 +08:00
parent 577c2a69f2
commit 145837ab67
1 changed files with 4 additions and 0 deletions

View File

@ -2492,6 +2492,10 @@ int tdbBtcClose(SBTC *pBtc) {
pBtc->idx = pBtc->idxStack[pBtc->iPage];
}
if (TDB_CELLDECODER_FREE_KEY(&pBtc->coder)) {
tdbFree(pBtc->coder.pKey);
}
if (TDB_CELLDECODER_FREE_VAL(&pBtc->coder)) {
tdbDebug("tdb btc/close decoder: %p pVal free: %p", &pBtc->coder, pBtc->coder.pVal);