提交 fd06e071 编写于 作者: dengyihao's avatar dengyihao

avoid invalid read/write

上级 7b30eede
...@@ -241,7 +241,7 @@ int32_t taosSendHttpReport(const char* server, uint16_t port, char* pCont, int32 ...@@ -241,7 +241,7 @@ int32_t taosSendHttpReport(const char* server, uint16_t port, char* pCont, int32
taosMemoryFree(loop); taosMemoryFree(loop);
terrno = TAOS_SYSTEM_ERROR(err); terrno = TAOS_SYSTEM_ERROR(err);
destroyHttpClient(cli); destroyHttpClient(cli);
return -1; return terrno;
} }
uv_tcp_init(loop, &cli->tcp); uv_tcp_init(loop, &cli->tcp);
// set up timeout to avoid stuck; // set up timeout to avoid stuck;
...@@ -266,5 +266,6 @@ int32_t taosSendHttpReport(const char* server, uint16_t port, char* pCont, int32 ...@@ -266,5 +266,6 @@ int32_t taosSendHttpReport(const char* server, uint16_t port, char* pCont, int32
uv_run(loop, UV_RUN_DEFAULT); uv_run(loop, UV_RUN_DEFAULT);
uv_loop_close(loop); uv_loop_close(loop);
taosMemoryFree(loop);
return terrno; return terrno;
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册