mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/malloc_warnings_transport' into 'master'
tcp_transport: fix minor memory leak found by static analyzer Closes IDF-681 See merge request idf/esp-idf!5141
This commit is contained in:
commit
3cc384fbe9
@ -296,7 +296,10 @@ esp_transport_handle_t esp_transport_ws_init(esp_transport_handle_t parent_handl
|
||||
ws->parent = parent_handle;
|
||||
|
||||
ws->path = strdup("/");
|
||||
ESP_TRANSPORT_MEM_CHECK(TAG, ws->path, return NULL);
|
||||
ESP_TRANSPORT_MEM_CHECK(TAG, ws->path, {
|
||||
free(ws);
|
||||
return NULL;
|
||||
});
|
||||
ws->buffer = malloc(DEFAULT_WS_BUFFER);
|
||||
ESP_TRANSPORT_MEM_CHECK(TAG, ws->buffer, {
|
||||
free(ws->path);
|
||||
|
Loading…
Reference in New Issue
Block a user