SecureStore: Don't use flags of corrupted data. Allow removing.

pull/11988/head
Seppo Takalo 2019-11-27 16:11:46 +02:00
parent 56d67360ef
commit bde9753696
1 changed files with 1 additions and 1 deletions

View File

@ -491,7 +491,7 @@ int SecureStore::remove(const char *key)
goto end;
}
if (info.flags & WRITE_ONCE_FLAG) {
if (ret == 0 && info.flags & WRITE_ONCE_FLAG) {
ret = MBED_ERROR_WRITE_PROTECTED;
goto end;
}