Merge pull request #27546 from taosdata/fix/TD-31794

fix mem leak
This commit is contained in:
Hongze Cheng 2024-08-29 17:45:08 +08:00 committed by GitHub
commit 42b9afbe89
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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 // already recv, and notify upper layer
TAOS_CHECK_GOTO(TSDB_CODE_REF_INVALID_ID, NULL, _exception); TAOS_CHECK_GOTO(TSDB_CODE_REF_INVALID_ID, NULL, _exception);
} else { } else {
destroyCmsg(pMsg);
(void)transReleaseExHandle(transGetRefMgt(), refId);
while (T_REF_VAL_GET(conn) >= 1) { while (T_REF_VAL_GET(conn) >= 1) {
transUnrefCliHandle(conn); transUnrefCliHandle(conn);
} }