fix mem leak

This commit is contained in:
Yihao Deng 2024-08-29 07:40:36 +00:00
parent e48bc2055f
commit 1667819c5c
1 changed files with 3 additions and 0 deletions

View File

@ -1656,6 +1656,9 @@ static void cliHandleFreeById(SCliMsg* pMsg, SCliThrd* pThrd) {
// already recv, and notify upper layer
TAOS_CHECK_GOTO(TSDB_CODE_REF_INVALID_ID, NULL, _exception);
} else {
destroyCmsg(pMsg);
(void)transReleaseExHandle(transGetRefMgt(), refId);
while (T_REF_VAL_GET(conn) >= 1) {
transUnrefCliHandle(conn);
}