fix mem leak while taosd quit

This commit is contained in:
yihaoDeng 2024-02-29 10:46:09 +00:00
parent a0c77f5baa
commit c3220aec44
1 changed files with 3 additions and 2 deletions

View File

@ -183,7 +183,8 @@ static void* httpThread(void* arg) {
return NULL;
}
static void httpDestroyMsg(SHttpMsg* msg) {
static void httpDestroyMsg(void* cont, void* param) {
SHttpMsg* msg = cont;
if (msg == NULL) return;
taosMemoryFree(msg->server);
@ -554,7 +555,7 @@ void transHttpEnvDestroy() {
httpSendQuit();
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);
uv_loop_close(load->loop);
taosMemoryFree(load->loop);