From 9f1f26d9f81bd66277faa6a7c397d61fc90c4667 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Procha=CC=81zka?= <90197375+P-R-O-C-H-Y@users.noreply.github.com> Date: Mon, 29 May 2023 13:34:24 +0200 Subject: [PATCH] free memory on detach --- cores/esp32/esp32-hal-ledc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cores/esp32/esp32-hal-ledc.c b/cores/esp32/esp32-hal-ledc.c index 5bee6deba4c..74aac1c463d 100644 --- a/cores/esp32/esp32-hal-ledc.c +++ b/cores/esp32/esp32-hal-ledc.c @@ -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; }