]> granicus.if.org Git - esp-idf/commit
nvs_flash: delete Storage if init fails
authorIvan Grokhotkov <ivan@espressif.com>
Mon, 18 Sep 2017 14:34:16 +0000 (22:34 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Tue, 19 Sep 2017 02:39:44 +0000 (10:39 +0800)
commitfe307891496bd511413eeba62353a4e04adfe866
treefa352041eaccd51818ce1fe76686c072ced0768a
parentf32b25ebe242bd88f54f84732c745bce5d283fd0
nvs_flash: delete Storage if init fails

Previously, nvs_flash_init_custom would not be called if Storage for a
particular partition was already created. This caused issues if the
first call to nvs_flash_init failed due to Storage init error. This issue
exhibited itself as random failures of NVS CI test.

With this change, storage object is deleted (and not added to storage
list) if initialization fails.
components/nvs_flash/src/nvs_api.cpp