fix: invalid read
This commit is contained in:
parent
9c050c0ea6
commit
015dd658e6
|
@ -736,6 +736,9 @@ static void cliDestroy(uv_handle_t* handle) {
|
|||
conn->timer->data = NULL;
|
||||
conn->timer = NULL;
|
||||
}
|
||||
int32_t* oVal = taosHashGet(pThrd->connLimitCache, conn->ip, strlen(conn->ip));
|
||||
int32_t nVal = oVal == NULL ? 0 : (*oVal) - 1;
|
||||
taosHashPut(pThrd->connLimitCache, conn->ip, strlen(conn->ip), &nVal, sizeof(nVal));
|
||||
|
||||
atomic_sub_fetch_32(&pThrd->connCount, 1);
|
||||
|
||||
|
@ -750,10 +753,6 @@ static void cliDestroy(uv_handle_t* handle) {
|
|||
transReqQueueClear(&conn->wreqQueue);
|
||||
transDestroyBuffer(&conn->readBuf);
|
||||
|
||||
int32_t* oVal = taosHashGet(pThrd->connLimitCache, conn->ip, strlen(conn->ip));
|
||||
int32_t nVal = oVal == NULL ? 0 : (*oVal) - 1;
|
||||
taosHashPut(pThrd->connLimitCache, conn->ip, strlen(conn->ip), &nVal, sizeof(nVal));
|
||||
|
||||
taosMemoryFree(conn);
|
||||
}
|
||||
static bool cliHandleNoResp(SCliConn* conn) {
|
||||
|
|
Loading…
Reference in New Issue