Skip to content

Commit 65b14f7

Browse files
committed
Fix 'new[]' array freed with 'delete'
The array _scratch_buf is allocated using new[] in line 761 of mbed-os/storage/kvstore/securestore/source/SecureStore.cpp. But it was freed using delete.
1 parent 975dfcf commit 65b14f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

storage/kvstore/securestore/source/SecureStore.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ int SecureStore::deinit()
789789
mbedtls_entropy_free(_entropy);
790790
delete _entropy;
791791
delete _ih;
792-
delete _scratch_buf;
792+
delete[] _scratch_buf;
793793
_entropy = nullptr;
794794
}
795795
ret = _underlying_kv->deinit();

0 commit comments

Comments
 (0)