Random NVS fixes

* Checking Lock::init() now
* fixed typos in nvs_flash.h
* Added missing parameter checks in nvs encryption
  function

* Closes IDF-1462
* Closes IDF-2900
This commit is contained in:
Jakob Hasse
2021-03-08 10:44:15 +08:00
parent e895e50098
commit d52a21de5c
6 changed files with 57 additions and 14 deletions
+8
View File
@@ -31,6 +31,14 @@ std::unique_ptr<NVSHandle> open_nvs_handle_from_partition(const char *partition_
return nullptr;
}
esp_err_t lock_result = Lock::init();
if (lock_result != ESP_OK) {
if (err != nullptr) {
*err = lock_result;
}
return nullptr;
}
Lock lock;
NVSHandleSimple *handle_simple;