From c3220aec44583595a5c2aae8c55675849c2bb79a Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Thu, 29 Feb 2024 10:46:09 +0000 Subject: [PATCH] fix mem leak while taosd quit --- source/libs/transport/src/thttp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/libs/transport/src/thttp.c b/source/libs/transport/src/thttp.c index 6de10cbb9e..e76f073d63 100644 --- a/source/libs/transport/src/thttp.c +++ b/source/libs/transport/src/thttp.c @@ -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);