提交 b2c0bcb1 编写于 作者: M Minglei Jin

tdb/ofp-recycle: fix mem leaks

上级 a3c9b172
......@@ -233,6 +233,7 @@ int tdbBtreeDelete(SBTree *pBt, const void *pKey, int kLen, TXN *pTxn) {
int ret;
tdbBtcOpen(&btc, pBt, pTxn);
btc.coder.ofps = taosArrayInit(8, sizeof(SPgno));
tdbTrace("tdb delete, btc: %p, pTxn: %p", &btc, pTxn);
......@@ -1317,10 +1318,9 @@ static int tdbBtreeDecodePayload(SPage *pPage, const SCell *pCell, int nHeader,
return -1;
}
if (!pDecoder->ofps) {
pDecoder->ofps = taosArrayInit(8, sizeof(SPgno));
if (pDecoder->ofps) {
taosArrayPush(pDecoder->ofps, &pgno);
}
taosArrayPush(pDecoder->ofps, &pgno);
ofpCell = tdbPageGetCell(ofp, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册