{"action":"created","issue":{"url":"https://api.github.com/repos/espressif/esp-idf/issues/2102","repository_url":"https://api.github.com/repos/espressif/esp-idf","labels_url":"https://api.github.com/repos/espressif/esp-idf/issues/2102/labels{/name}","comments_url":"https://api.github.com/repos/espressif/esp-idf/issues/2102/comments","events_url":"https://api.github.com/repos/espressif/esp-idf/issues/2102/events","html_url":"https://github.com/espressif/esp-idf/issues/2102","id":335433869,"node_id":"MDU6SXNzdWUzMzU0MzM4Njk=","number":2102,"title":"esp_http_client MEMORY LEAKS","user":{"login":"DavidMora","id":5810696,"node_id":"MDQ6VXNlcjU4MTA2OTY=","avatar_url":"https://avatars0.githubusercontent.com/u/5810696?v=4","gravatar_id":"","url":"https://api.github.com/users/DavidMora","html_url":"https://github.com/DavidMora","followers_url":"https://api.github.com/users/DavidMora/followers","following_url":"https://api.github.com/users/DavidMora/following{/other_user}","gists_url":"https://api.github.com/users/DavidMora/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidMora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidMora/subscriptions","organizations_url":"https://api.github.com/users/DavidMora/orgs","repos_url":"https://api.github.com/users/DavidMora/repos","events_url":"https://api.github.com/users/DavidMora/events{/privacy}","received_events_url":"https://api.github.com/users/DavidMora/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-06-25T14:33:17Z","updated_at":"2018-06-26T15:10:42Z","closed_at":null,"author_association":"NONE","body":"\r\n## Environment\r\n\r\n- Development Kit:      ESP32-Wrover-Kit\r\n- Kit version (for WroverKit/PicoKit/DevKitC): v3\r\n- Core (if using chip or module): ESP32-Wrover\r\n- IDF version (``git rev-parse --short HEAD`` to get the commit id.): 4b91c82cc447640e5b61407e810f1d6f3eabd233\r\n- Development Env:\t\tMake\r\n- Operating System:\t\tUbuntu\r\n- Power Supply:         USB\r\n## Problem Description\r\n\r\nesp_http_client module has memory leaks after perform. After taking a look at the code i think it is related to headers or body data. Since i was able to perform against custom server with no response packages and no leaks. \r\n\r\n### Expected Behavior\r\n\r\nNo memory leaks\r\n\r\n### Actual Behavior\r\n\r\nTEST CASE:\r\n\r\nRunning **HTTPREQUEST - send MEMORY LEAKS ON SIMPLE PERFORM  ...\r\nMALLOC_CAP_8BIT potential leak: Before 227324 bytes free, After 226620 bytes free (delta 704)\r\nMALLOC_CAP_32BIT potential leak: Before 289596 bytes free, After 288892 bytes free (delta 704)\r\n./test_httprequest.c:205:**HTTPREQUEST - send MEMORY LEAKS ON SIMPLE PERFORM  :PASS\r\nTest ran in 518ms\r\n\r\n### Steps to repropduce\r\n\r\nJust write the test below, different servers have different deltas.\r\n\r\n### Code to reproduce this issue\r\n\r\n```cpp\r\nTEST_CASE(\"**HTTPREQUEST - send MEMORY LEAKS ON SIMPLE PERFORM  \", \"[httprequest]\")\r\n{\r\n    esp_http_client_config_t config = {\r\n        .url=\"http://inmote.api.insite.com.co:3100/\",        \r\n    };\r\n    esp_http_client_handle_t client = esp_http_client_init(&config);\r\n    esp_http_client_perform(client);\r\n    esp_http_client_cleanup(client);\r\n}\r\n```\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/espressif/esp-idf/issues/comments/400345737","html_url":"https://github.com/espressif/esp-idf/issues/2102#issuecomment-400345737","issue_url":"https://api.github.com/repos/espressif/esp-idf/issues/2102","id":400345737,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMDM0NTczNw==","user":{"login":"DavidMora","id":5810696,"node_id":"MDQ6VXNlcjU4MTA2OTY=","avatar_url":"https://avatars0.githubusercontent.com/u/5810696?v=4","gravatar_id":"","url":"https://api.github.com/users/DavidMora","html_url":"https://github.com/DavidMora","followers_url":"https://api.github.com/users/DavidMora/followers","following_url":"https://api.github.com/users/DavidMora/following{/other_user}","gists_url":"https://api.github.com/users/DavidMora/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidMora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidMora/subscriptions","organizations_url":"https://api.github.com/users/DavidMora/orgs","repos_url":"https://api.github.com/users/DavidMora/repos","events_url":"https://api.github.com/users/DavidMora/events{/privacy}","received_events_url":"https://api.github.com/users/DavidMora/received_events","type":"User","site_admin":false},"created_at":"2018-06-26T15:10:42Z","updated_at":"2018-06-26T15:10:42Z","author_association":"NONE","body":"How much time is it needed to confirm or discard memory leaks?\n\n2018-06-26 8:44 GMT-05:00 Frederik <notifications@github.com>:\n\n> AFAIK it has to do with the way the memory is allocated for the internal\n> network/TCP/LWIP-stacks. I think some of this only happens once and the\n> other memories are cleared regularly in other tasks (for example the\n> network task), therefor the freeing of all memory might be delayed. But\n> unless your example shows an \"endless\" leak it would not actually be\n> considered a memory leak at all.\n>\n> —\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/espressif/esp-idf/issues/2102#issuecomment-400313811>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AFiqCNn9AgRT2qZCyglZPkOKVVW_VBxOks5uAjrCgaJpZM4U2RGx>\n> .\n>\n"}}
{"actor":{"display_login":"DavidMora"}}