mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
partition iterator: Free iterator when reaching end of linked list
This commit is contained in:
parent
902382f622
commit
4170b8c32e
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user