diff --git a/storage/blockdevice/source/SFDP.cpp b/storage/blockdevice/source/SFDP.cpp index 3b5ac248f9..5f28738695 100644 --- a/storage/blockdevice/source/SFDP.cpp +++ b/storage/blockdevice/source/SFDP.cpp @@ -256,7 +256,7 @@ int sfdp_parse_sector_map_table(Callback sfdp * - regions in each configuration * is variable -> the size of this table is variable */ - auto smptbl_buff = std::make_unique(sfdp_info.smptbl.size); + auto smptbl_buff = std::unique_ptr(new (std::nothrow) uint8_t[sfdp_info.smptbl.size]); if (!smptbl_buff) { tr_error("Failed to allocate memory"); return -1;