Skip to content

Commit

Permalink
free memory on detach (#8264)
Browse files Browse the repository at this point in the history
  • Loading branch information
P-R-O-C-H-Y authored May 31, 2023
1 parent ca7bcc0 commit 0829e07
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cores/esp32/esp32-hal-ledc.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ static bool ledcDetachBus(void * bus){
ledc_channel_handle_t handle = (ledc_channel_handle_t)bus;
ledc_handle.used_channels &= ~(1UL << handle->channel);
pinMatrixOutDetach(handle->pin, false, false);
free(handle);
return true;
}

Expand Down

0 comments on commit 0829e07

Please sign in to comment.