diff --git a/tool/speed.cc b/tool/speed.cc index 28a07a1865..7c17d89c45 100644 --- a/tool/speed.cc +++ b/tool/speed.cc @@ -1261,7 +1261,7 @@ const size_t SCRATCH_SIZE = 16384; using RandomFunction = std::function; static bool SpeedRandomChunk(RandomFunction function, std::string name, size_t chunk_len) { - bssl::UniquePtr scratch((uint8_t*)OPENSSL_malloc(SCRATCH_SIZE)); + std::unique_ptr scratch(new uint8_t[SCRATCH_SIZE]); if (chunk_len > SCRATCH_SIZE) { return false;