kopia lustrzana https://github.com/espressif/esp-idf
Merge branch 'fix/coverity_use_after_free_partition.c' into 'master'
fix(partition): Simplify macro loop in esp_partition_unload_all, should fix Coverity problem Closes IDF-9837 See merge request espressif/esp-idf!30853pull/13856/head
commit
050db26419
|
@ -238,7 +238,8 @@ void esp_partition_unload_all(void)
|
|||
partition_list_item_t *it;
|
||||
partition_list_item_t *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);
|
||||
}
|
||||
_lock_release(&s_partition_list_lock);
|
||||
|
|
Ładowanie…
Reference in New Issue