We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c6cde56 commit d30bdd5Copy full SHA for d30bdd5
src/platform/Infineon/CYW30739/KeyValueStoreManagerImpl.cpp
@@ -149,8 +149,11 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Delete(const char * key)
149
err = CYW30739Config::ClearConfigValue(entry->GetKeyConfigKey());
150
VerifyOrExit(ChipError::IsSuccess(err), err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND);
151
152
- err = CYW30739Config::ClearConfigValue(entry->GetValueConfigKey());
153
- VerifyOrExit(ChipError::IsSuccess(err), err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND);
+ if (entry->GetValueSize() != 0)
+ {
154
+ err = CYW30739Config::ClearConfigValue(entry->GetValueConfigKey());
155
+ VerifyOrExit(ChipError::IsSuccess(err), err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND);
156
+ }
157
158
slist_del(entry, &mKeyConfigIdList);
159
Platform::Delete(entry);
0 commit comments