fix trans invalid read

This commit is contained in:
yihaoDeng 2023-09-27 19:54:09 +08:00
parent 42aac4e30c
commit 4581c296d0
1 changed files with 5 additions and 2 deletions

View File

@ -576,6 +576,7 @@ void* destroyConnPool(SCliThrd* pThrd) {
connList = taosHashIterate((SHashObj*)pool, connList);
}
taosHashCleanup(pool);
pThrd->pool = NULL;
return NULL;
}
@ -870,8 +871,10 @@ static void cliDestroyConn(SCliConn* conn, bool clear) {
connList->list->numOfConn--;
connList->size--;
} else {
SConnList* connList = taosHashGet((SHashObj*)pThrd->pool, conn->dstAddr, strlen(conn->dstAddr) + 1);
if (connList != NULL) connList->list->numOfConn--;
if (pThrd->pool) {
SConnList* connList = taosHashGet((SHashObj*)pThrd->pool, conn->dstAddr, strlen(conn->dstAddr) + 1);
if (connList != NULL) connList->list->numOfConn--;
}
}
conn->list = NULL;
pThrd->newConnCount--;