kopia lustrzana https://github.com/espressif/esp-idf
tcp_transport: fix minor memory leak found by static analyzer
Closes https://github.com/espressif/esp-idf/issues/3602pull/3627/head^2
rodzic
bde1c30c5b
commit
243e0b229f
|
@ -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);
|
||||
|
|
Ładowanie…
Reference in New Issue