fix: taosd crash issue

This commit is contained in:
dapan1121 2023-02-10 10:57:50 +08:00
parent 3b238524b0
commit 5d526d9269
1 changed files with 7 additions and 1 deletions

View File

@ -420,7 +420,13 @@ static void transHttpEnvInit() {
uv_loop_init(http->loop);
http->asyncPool = transAsyncPoolCreate(http->loop, 1, http, httpAsyncCb);
if (NULL == http->asyncPool) {
taosMemoryFree(http->loop);
taosMemoryFree(http);
http = NULL;
return;
}
int err = taosThreadCreate(&http->thread, NULL, httpThread, (void*)http);
if (err != 0) {
taosMemoryFree(http->loop);