fix memory leak
This commit is contained in:
parent
786b368b8a
commit
c19e7779df
|
@ -588,6 +588,8 @@ char *metaTbCursorNext(SMTbCursor *pTbCur) {
|
||||||
metaDecodeTbInfo(pBuf, &tbCfg);
|
metaDecodeTbInfo(pBuf, &tbCfg);
|
||||||
if (tbCfg.type == META_SUPER_TABLE) {
|
if (tbCfg.type == META_SUPER_TABLE) {
|
||||||
continue;
|
continue;
|
||||||
|
} else if (tbCfg.type == META_CHILD_TABLE) {
|
||||||
|
kvRowFree(tbCfg.ctbCfg.pTag)
|
||||||
}
|
}
|
||||||
return tbCfg.name;
|
return tbCfg.name;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -71,6 +71,7 @@ int vnodeOpenBufPool(SVnode *pVnode) {
|
||||||
|
|
||||||
void vnodeCloseBufPool(SVnode *pVnode) {
|
void vnodeCloseBufPool(SVnode *pVnode) {
|
||||||
if (pVnode->pBufPool) {
|
if (pVnode->pBufPool) {
|
||||||
|
tfree(pVnode->pBufPool->pMAF);
|
||||||
vmaDestroy(pVnode->pBufPool->inuse);
|
vmaDestroy(pVnode->pBufPool->inuse);
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
|
@ -119,6 +119,7 @@ static void* loop(void* arg) {
|
||||||
pthread_mutex_unlock(&(vnodeMgr.mutex));
|
pthread_mutex_unlock(&(vnodeMgr.mutex));
|
||||||
|
|
||||||
(*(pTask->execute))(pTask->arg);
|
(*(pTask->execute))(pTask->arg);
|
||||||
|
free(pTask);
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -145,6 +145,9 @@ static int vnodeGetTableMeta(SVnode *pVnode, SRpcMsg *pMsg, SRpcMsg **pRsp) {
|
||||||
|
|
||||||
_exit:
|
_exit:
|
||||||
|
|
||||||
|
free(pSW);
|
||||||
|
free(pTbCfg->name);
|
||||||
|
free(pTbCfg);
|
||||||
rpcMsg.handle = pMsg->handle;
|
rpcMsg.handle = pMsg->handle;
|
||||||
rpcMsg.ahandle = pMsg->ahandle;
|
rpcMsg.ahandle = pMsg->ahandle;
|
||||||
rpcMsg.pCont = pTbMetaMsg;
|
rpcMsg.pCont = pTbMetaMsg;
|
||||||
|
|
|
@ -76,6 +76,9 @@ int vnodeApplyWMsg(SVnode *pVnode, SRpcMsg *pMsg, SRpcMsg **pRsp) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: maybe need to clear the requst struct
|
// TODO: maybe need to clear the requst struct
|
||||||
|
free(vCreateTbReq.stbCfg.pSchema);
|
||||||
|
free(vCreateTbReq.stbCfg.pTagSchema);
|
||||||
|
free(vCreateTbReq.name);
|
||||||
break;
|
break;
|
||||||
case TDMT_VND_CREATE_TABLE:
|
case TDMT_VND_CREATE_TABLE:
|
||||||
tSVCreateTbBatchReqDeserialize(POINTER_SHIFT(pMsg->pCont, sizeof(SMsgHead)), &vCreateTbBatchReq);
|
tSVCreateTbBatchReqDeserialize(POINTER_SHIFT(pMsg->pCont, sizeof(SMsgHead)), &vCreateTbBatchReq);
|
||||||
|
|
Loading…
Reference in New Issue