Skip to content

Commit 5f3e523

Browse files
committed
Merge branch 'bugfix/task_create_with_caps_leak' into 'main'
Fix leakage when create task use xTaskCreatePinnedToCoreWithCaps See merge request adf/esp-webrtc-solution!4
2 parents 5d41238 + 0496b0b commit 5f3e523

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

components/media_lib_sal/port/media_lib_os_freertos.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,14 @@ static int _thread_create(media_lib_thread_handle_t *handle, const char *name,
211211

212212
static void _thread_destroy(media_lib_thread_handle_t handle)
213213
{
214+
#if defined(CONFIG_SPIRAM_BOOT_INIT) && \
215+
(CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY) && \
216+
(ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0))
217+
vTaskDeleteWithCaps((TaskHandle_t)handle);
218+
#else
214219
// allow NULL to destroy self
215220
vTaskDelete((TaskHandle_t)handle);
221+
#endif
216222
}
217223

218224
static bool _thread_set_priority(media_lib_thread_handle_t handle, int prio)

0 commit comments

Comments
 (0)