Skip to content

Commit 5d91d55

Browse files
committed
fix: call delete [] on array allocations
1 parent 310abce commit 5d91d55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/mpz.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ void display(std::ostream & out, __mpz_struct const * v) {
304304
mpz_get_str(buffer, 10, v);
305305
out << buffer;
306306
} else {
307-
std::unique_ptr<char> buffer(new char[sz]);
307+
std::unique_ptr<char[]> buffer(new char[sz]);
308308
mpz_get_str(buffer.get(), 10, v);
309309
out << buffer.get();
310310
}

0 commit comments

Comments
 (0)