diff --git a/features/storage/blockdevice/FlashSimBlockDevice.cpp b/features/storage/blockdevice/FlashSimBlockDevice.cpp index 3c1f4cd3c6..726103920e 100644 --- a/features/storage/blockdevice/FlashSimBlockDevice.cpp +++ b/features/storage/blockdevice/FlashSimBlockDevice.cpp @@ -60,6 +60,7 @@ int FlashSimBlockDevice::init() _blank_buf_size = align_up(min_blank_buf_size, _bd->get_program_size()); if (!_blank_buf) { _blank_buf = new uint8_t[_blank_buf_size]; + memset(_blank_buf, 0, _blank_buf_size); MBED_ASSERT(_blank_buf); }