1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

cpu/esp_common/freertos: Handle NULL being passed to vTaskDelete

This commit is contained in:
Flole998 2023-01-24 16:50:05 +00:00
parent 1a4af03a94
commit 56d2997d95

View File

@ -116,6 +116,9 @@ void vTaskDelete(TaskHandle_t xTaskToDelete)
DEBUG("%s pid=%d task=%p\n", __func__, thread_getpid(), xTaskToDelete);
uint32_t pid = (uint32_t)xTaskToDelete;
if (pid == 0) {
pid = thread_getpid();
}
assert(pid_is_valid(pid));
/* remove the task from scheduling */