mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix(partition): Simplify macro loop in esp_partition_unload_all
This commit is contained in:
parent
f97ad23b4d
commit
c2ac9bad62
@ -237,7 +237,8 @@ void esp_partition_unload_all(void)
|
|||||||
partition_list_item_t *it;
|
partition_list_item_t *it;
|
||||||
partition_list_item_t *tmp;
|
partition_list_item_t *tmp;
|
||||||
SLIST_FOREACH_SAFE(it, &s_partition_list, next, tmp) {
|
SLIST_FOREACH_SAFE(it, &s_partition_list, next, tmp) {
|
||||||
SLIST_REMOVE(&s_partition_list, it, partition_list_item_, next);
|
// Remove current head from the list and free it, new head is the next element
|
||||||
|
SLIST_REMOVE_HEAD(&s_partition_list, next);
|
||||||
free(it);
|
free(it);
|
||||||
}
|
}
|
||||||
_lock_release(&s_partition_list_lock);
|
_lock_release(&s_partition_list_lock);
|
||||||
|
Loading…
Reference in New Issue
Block a user