kopia lustrzana https://github.com/espressif/esp-idf
partition iterator: Free iterator when reaching end of linked list
rodzic
902382f622
commit
4170b8c32e
|
@ -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);
|
||||||
|
|
Ładowanie…
Reference in New Issue