fix mem leak while taosd quit
This commit is contained in:
parent
a0c77f5baa
commit
c3220aec44
|
@ -183,7 +183,8 @@ static void* httpThread(void* arg) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void httpDestroyMsg(SHttpMsg* msg) {
|
static void httpDestroyMsg(void* cont, void* param) {
|
||||||
|
SHttpMsg* msg = cont;
|
||||||
if (msg == NULL) return;
|
if (msg == NULL) return;
|
||||||
|
|
||||||
taosMemoryFree(msg->server);
|
taosMemoryFree(msg->server);
|
||||||
|
@ -554,7 +555,7 @@ void transHttpEnvDestroy() {
|
||||||
httpSendQuit();
|
httpSendQuit();
|
||||||
taosThreadJoin(load->thread, NULL);
|
taosThreadJoin(load->thread, NULL);
|
||||||
|
|
||||||
TRANS_DESTROY_ASYNC_POOL_MSG(load->asyncPool, SHttpMsg, httpDestroyMsg);
|
TRANS_DESTROY_ASYNC_POOL_MSG(load->asyncPool, SHttpMsg, httpDestroyMsg, NULL);
|
||||||
transAsyncPoolDestroy(load->asyncPool);
|
transAsyncPoolDestroy(load->asyncPool);
|
||||||
uv_loop_close(load->loop);
|
uv_loop_close(load->loop);
|
||||||
taosMemoryFree(load->loop);
|
taosMemoryFree(load->loop);
|
||||||
|
|
Loading…
Reference in New Issue