From: Serge Pavlov Date: Wed, 14 Feb 2018 05:14:31 +0000 (+0000) Subject: Use delete[] to deallocate array of chars X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4dff9f9a39f699cdc3d08f4250cd7322cb7743c4;p=platform%2Fupstream%2Fllvm.git Use delete[] to deallocate array of chars llvm-svn: 325099 --- diff --git a/llvm/tools/llvm-objdump/MachODump.cpp b/llvm/tools/llvm-objdump/MachODump.cpp index f44e432..61b0b0e 100644 --- a/llvm/tools/llvm-objdump/MachODump.cpp +++ b/llvm/tools/llvm-objdump/MachODump.cpp @@ -2760,7 +2760,7 @@ static void method_reference(struct DisassembleInfo *info, if (strcmp(*ReferenceName, "_objc_msgSend") == 0) { if (info->selector_name != nullptr) { if (info->method != nullptr) - delete info->method; + delete[] info->method; if (info->class_name != nullptr) { info->method = new char[5 + strlen(info->class_name) + strlen(info->selector_name)]; @@ -2793,7 +2793,7 @@ static void method_reference(struct DisassembleInfo *info, } else if (strcmp(*ReferenceName, "_objc_msgSendSuper2") == 0) { if (info->selector_name != nullptr) { if (info->method != nullptr) - delete info->method; + delete[] info->method; info->method = new char[17 + strlen(info->selector_name)]; if (info->method != nullptr) { if (Arch == Triple::x86_64)