iotkit-embedded icon indicating copy to clipboard operation
iotkit-embedded copied to clipboard

[http] Memory leak with wrapper_http_deinit(...) call

Open ccli8 opened this issue 6 years ago • 0 comments

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;
    }
......

ccli8 avatar Dec 06 '19 01:12 ccli8