nvs: fix memory leaks in HashList and nvs_close

Fixes TW8162.
Associated test case is run under Instruments on macOS, until I set up valgrind to test this automatically on Linux.
This commit is contained in:
Ivan Grokhotkov
2016-10-26 12:25:53 +08:00
parent cbb26c9532
commit 74a658c765
5 changed files with 38 additions and 4 deletions
+1 -1
View File
@@ -741,7 +741,7 @@ esp_err_t Page::erase()
mFirstUsedEntry = INVALID_ENTRY;
mNextFreeEntry = INVALID_ENTRY;
mState = PageState::UNINITIALIZED;
mHashList = HashList();
mHashList.clear();
return ESP_OK;
}