Skip to content

Commit

Permalink
partition iterator: Free iterator when reaching end of linked list
Browse files Browse the repository at this point in the history
  • Loading branch information
projectgus committed Feb 21, 2017
1 parent 902382f commit 4170b8c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions components/spi_flash/partition.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4170b8c

Please sign in to comment.