1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Use delete[] to deallocate array of chars

llvm-svn: 325099
This commit is contained in:
Serge Pavlov 2018-02-14 05:14:31 +00:00
parent 4d8a6548e7
commit 18df8e9c56

View File

@ -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)