fix invalid free
This commit is contained in:
parent
2e56479f8a
commit
3843fa6de8
|
@ -2498,10 +2498,6 @@ static int32_t createThrdObj(void* trans, SCliThrd** ppThrd) {
|
|||
_end:
|
||||
if (pThrd) {
|
||||
TAOS_UNUSED(taosThreadMutexDestroy(&pThrd->msgMtx));
|
||||
|
||||
TAOS_UNUSED(uv_loop_close(pThrd->loop));
|
||||
taosMemoryFree(pThrd->loop);
|
||||
TAOS_UNUSED((taosThreadMutexDestroy(&pThrd->msgMtx)));
|
||||
transAsyncPoolDestroy(pThrd->asyncPool);
|
||||
for (int i = 0; i < taosArrayGetSize(pThrd->timerList); i++) {
|
||||
uv_timer_t* timer = taosArrayGetP(pThrd->timerList, i);
|
||||
|
@ -2511,6 +2507,9 @@ _end:
|
|||
taosArrayDestroy(pThrd->timerList);
|
||||
|
||||
TAOS_UNUSED(destroyConnPool(pThrd));
|
||||
TAOS_UNUSED(uv_loop_close(pThrd->loop));
|
||||
taosMemoryFree(pThrd->loop);
|
||||
|
||||
transDQDestroy(pThrd->delayQueue, NULL);
|
||||
transDQDestroy(pThrd->timeoutQueue, NULL);
|
||||
transDQDestroy(pThrd->waitConnQueue, NULL);
|
||||
|
|
|
@ -1379,6 +1379,9 @@ _end:
|
|||
pConn = NULL;
|
||||
}
|
||||
tError("%s failed to create conn since %s", transLabel(pInst), tstrerror(code));
|
||||
return NULL;
|
||||
_end2:
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue