fix trans invalid read
This commit is contained in:
parent
42aac4e30c
commit
4581c296d0
|
@ -576,6 +576,7 @@ void* destroyConnPool(SCliThrd* pThrd) {
|
||||||
connList = taosHashIterate((SHashObj*)pool, connList);
|
connList = taosHashIterate((SHashObj*)pool, connList);
|
||||||
}
|
}
|
||||||
taosHashCleanup(pool);
|
taosHashCleanup(pool);
|
||||||
|
pThrd->pool = NULL;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -870,8 +871,10 @@ static void cliDestroyConn(SCliConn* conn, bool clear) {
|
||||||
connList->list->numOfConn--;
|
connList->list->numOfConn--;
|
||||||
connList->size--;
|
connList->size--;
|
||||||
} else {
|
} else {
|
||||||
SConnList* connList = taosHashGet((SHashObj*)pThrd->pool, conn->dstAddr, strlen(conn->dstAddr) + 1);
|
if (pThrd->pool) {
|
||||||
if (connList != NULL) connList->list->numOfConn--;
|
SConnList* connList = taosHashGet((SHashObj*)pThrd->pool, conn->dstAddr, strlen(conn->dstAddr) + 1);
|
||||||
|
if (connList != NULL) connList->list->numOfConn--;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
conn->list = NULL;
|
conn->list = NULL;
|
||||||
pThrd->newConnCount--;
|
pThrd->newConnCount--;
|
||||||
|
|
Loading…
Reference in New Issue