mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-03 12:44: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);
|
||||
// iterator reached the end of linked list?
|
||||
if (it->next_item == NULL) {
|
||||
esp_partition_iterator_release(it);
|
||||
return NULL;
|
||||
}
|
||||
_lock_acquire(&s_partition_list_lock);
|
||||
|
Reference in New Issue
Block a user