Fix alloc-dealloc-mismatch failures in dex2oat.

These errors are for calling `delete` on something allocated with
`new[]`.

Bug: 18202869
Change-Id: I8032664dd0819740e83a04cd5a0d56e2c097aacf
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index 00661f4..e83f626 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -548,7 +548,7 @@
       } else if (option.starts_with("--instruction-set=")) {
         StringPiece instruction_set_str = option.substr(strlen("--instruction-set=")).data();
         // StringPiece is not necessarily zero-terminated, so need to make a copy and ensure it.
-        std::unique_ptr<char> buf(new char[instruction_set_str.length() + 1]);
+        std::unique_ptr<char[]> buf(new char[instruction_set_str.length() + 1]);
         strncpy(buf.get(), instruction_set_str.data(), instruction_set_str.length());
         buf.get()[instruction_set_str.length()] = 0;
         instruction_set_ = GetInstructionSetFromString(buf.get());
@@ -1321,7 +1321,7 @@
       std::unique_ptr<File> in(OS::OpenFileForReading(oat_unstripped_.c_str()));
       std::unique_ptr<File> out(OS::CreateEmptyFile(oat_stripped_.c_str()));
       size_t buffer_size = 8192;
-      std::unique_ptr<uint8_t> buffer(new uint8_t[buffer_size]);
+      std::unique_ptr<uint8_t[]> buffer(new uint8_t[buffer_size]);
       while (true) {
         int bytes_read = TEMP_FAILURE_RETRY(read(in->Fd(), buffer.get(), buffer_size));
         if (bytes_read <= 0) {