fix indirect leak

This commit is contained in:
yihaoDeng 2024-09-06 17:50:35 +08:00
parent 3b283b6350
commit 46a79c0be3
1 changed files with 5 additions and 1 deletions

View File

@ -619,7 +619,11 @@ void* createConnPool(int size) {
return taosHashInit(size, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY), false, HASH_NO_LOCK); return taosHashInit(size, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY), false, HASH_NO_LOCK);
} }
void* destroyConnPool(SCliThrd* pThrd) { void* destroyConnPool(SCliThrd* pThrd) {
void* pool = pThrd->pool; void* pool = pThrd->pool;
if (pool == NULL) {
return NULL;
}
SConnList* connList = taosHashIterate((SHashObj*)pool, NULL); SConnList* connList = taosHashIterate((SHashObj*)pool, NULL);
while (connList != NULL) { while (connList != NULL) {
while (!QUEUE_IS_EMPTY(&connList->conns)) { while (!QUEUE_IS_EMPTY(&connList->conns)) {