Merge pull request #18848 from taosdata/fix/exHandleMemleak
fix: exhandle mem leak
This commit is contained in:
commit
70f74c3f37
|
@ -589,6 +589,7 @@ static void addConnToPool(void* pool, SCliConn* conn) {
|
|||
}
|
||||
static int32_t allocConnRef(SCliConn* conn, bool update) {
|
||||
if (update) {
|
||||
transReleaseExHandle(transGetRefMgt(), conn->refId);
|
||||
transRemoveExHandle(transGetRefMgt(), conn->refId);
|
||||
conn->refId = -1;
|
||||
}
|
||||
|
@ -697,6 +698,7 @@ static void cliDestroyConn(SCliConn* conn, bool clear) {
|
|||
tTrace("%s conn %p remove from conn pool", CONN_GET_INST_LABEL(conn), conn);
|
||||
QUEUE_REMOVE(&conn->q);
|
||||
QUEUE_INIT(&conn->q);
|
||||
transReleaseExHandle(transGetRefMgt(), conn->refId);
|
||||
transRemoveExHandle(transGetRefMgt(), conn->refId);
|
||||
conn->refId = -1;
|
||||
|
||||
|
@ -731,6 +733,7 @@ static void cliDestroy(uv_handle_t* handle) {
|
|||
conn->timer = NULL;
|
||||
}
|
||||
|
||||
transReleaseExHandle(transGetRefMgt(), conn->refId);
|
||||
transRemoveExHandle(transGetRefMgt(), conn->refId);
|
||||
taosMemoryFree(conn->ip);
|
||||
taosMemoryFree(conn->stream);
|
||||
|
|
Loading…
Reference in New Issue