Skip to content

Commit

Permalink
Use std::unique_ptr
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth committed Nov 13, 2024
1 parent 5017390 commit 25b951e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tool/speed.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,7 @@ const size_t SCRATCH_SIZE = 16384;

using RandomFunction = std::function<void(uint8_t *, size_t)>;
static bool SpeedRandomChunk(RandomFunction function, std::string name, size_t chunk_len) {
bssl::UniquePtr<uint8_t> scratch((uint8_t*)OPENSSL_malloc(SCRATCH_SIZE));
std::unique_ptr<uint8_t[]> scratch(new uint8_t[SCRATCH_SIZE]);

if (chunk_len > SCRATCH_SIZE) {
return false;
Expand Down

0 comments on commit 25b951e

Please sign in to comment.