diff --git a/src/google/protobuf/arena.h b/src/google/protobuf/arena.h index a13fccf93e..c8ccfe24a1 100644 --- a/src/google/protobuf/arena.h +++ b/src/google/protobuf/arena.h @@ -266,7 +266,7 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final { ABSL_CHECK_LE(num_elements, std::numeric_limits::max() / sizeof(T)) << "Requested size is too large to fit into size_t."; if (PROTOBUF_PREDICT_FALSE(arena == nullptr)) { - return static_cast(::operator new[](num_elements * sizeof(T))); + return new T[num_elements]; } else { // We count on compiler to realize that if sizeof(T) is a multiple of // 8 AlignUpTo can be elided.