Merge pull request #18777 from taosdata/fix/fixMemleakOnExit

fix: fix mem leak
This commit is contained in:
Shengliang Guan 2022-12-07 19:34:12 +08:00 committed by GitHub
commit 960bcaa22f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -301,6 +301,7 @@ int32_t dmInitServer(SDnode *pDnode) {
rpcInit.connType = TAOS_CONN_SERVER;
rpcInit.idleTime = tsShellActivityTimer * 1000;
rpcInit.parent = pDnode;
rpcInit.compressSize = tsCompressMsgSize;
pTrans->serverRpc = rpcOpen(&rpcInit);
if (pTrans->serverRpc == NULL) {

View File

@ -1195,6 +1195,8 @@ void transCloseServer(void* arg) {
sendQuitToWorkThrd(srv->pThreadObj[i]);
destroyWorkThrd(srv->pThreadObj[i]);
}
} else {
uv_loop_close(srv->loop);
}
taosMemoryFree(srv->pThreadObj);