From 25b951e7a4280965d26548b6a5140bedc9f9661e Mon Sep 17 00:00:00 2001 From: Justin Smith Date: Wed, 13 Nov 2024 13:10:19 -0500 Subject: [PATCH] Use std::unique_ptr --- tool/speed.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;