Skip to content

Commit bde9753

Browse files
author
Seppo Takalo
committed
SecureStore: Don't use flags of corrupted data. Allow removing.
1 parent 56d6736 commit bde9753

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

features/storage/kvstore/securestore/SecureStore.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ int SecureStore::remove(const char *key)
491491
goto end;
492492
}
493493

494-
if (info.flags & WRITE_ONCE_FLAG) {
494+
if (ret == 0 && info.flags & WRITE_ONCE_FLAG) {
495495
ret = MBED_ERROR_WRITE_PROTECTED;
496496
goto end;
497497
}

0 commit comments

Comments
 (0)