Skip to content

Commit

Permalink
Merge pull request #686 from bryghtlabs-richard/fix/wsExampleLeak
Browse files Browse the repository at this point in the history
fix(websocket): fix example buffer leak
  • Loading branch information
david-cermak authored Nov 5, 2024
2 parents 542547d + 5219c39 commit 0b5e362
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 0b5e362

Please sign in to comment.