mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-05 21:54:33 +02:00
partition iterator: Free iterator when reaching end of linked list
This commit is contained in:
@@ -85,6 +85,7 @@ esp_partition_iterator_t esp_partition_next(esp_partition_iterator_t it)
|
|||||||
assert(it);
|
assert(it);
|
||||||
// iterator reached the end of linked list?
|
// iterator reached the end of linked list?
|
||||||
if (it->next_item == NULL) {
|
if (it->next_item == NULL) {
|
||||||
|
esp_partition_iterator_release(it);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
_lock_acquire(&s_partition_list_lock);
|
_lock_acquire(&s_partition_list_lock);
|
||||||
|
Reference in New Issue
Block a user