iotkit-embedded
iotkit-embedded copied to clipboard
[http] Memory leak with wrapper_http_deinit(...) call
iotkit-embedded 3e60c94b (HEAD, origin/v3.1.0) [dev_model] change data type of alink msgid to int
In both the functions below, the wrapper_http_deinit(...) call must fix to wrapper_http_deinit(&http_handle):
src/http/iotx_http_api.c:
int IOT_HTTP_SendMessage(void *handle, iotx_http_message_param_t *msg_param)
{
......
do_exit_pre:
if (http_handle) {
wrapper_http_deinit(http_handle);
http_handle = NULL;
}
......
int IOT_HTTP_DeviceNameAuth(void *handle)
{
......
do_exit_pre:
if (http_handle) {
wrapper_http_deinit(http_handle);
http_handle = NULL;
}
......