Skip to content

Commit

Permalink
fix(websocket): fix example buffer leak
Browse files Browse the repository at this point in the history
  • Loading branch information
bryghtlabs-richard committed Nov 4, 2024
1 parent 542547d commit 5219c39
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ static void websocket_app_start(void)
char *long_data = malloc(size);
memset(long_data, 'a', size);
esp_websocket_client_send_text(client, long_data, size, portMAX_DELAY);
free(long_data);

xSemaphoreTake(shutdown_sema, portMAX_DELAY);
esp_websocket_client_close(client, portMAX_DELAY);
Expand Down

0 comments on commit 5219c39

Please sign in to comment.