avoid invalid read/write
This commit is contained in:
parent
7b30eedec0
commit
fd06e0717d
|
@ -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
|
||||||
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue