SWDEV-1 - Some 'delete' clean up

Change-Id: I02564f0f0e349375bde1471e9f82df268703367b


[ROCm/clr commit: 73967c3b17]
This commit is contained in:
Jason Tang
2021-09-06 17:55:09 -04:00
کامیت شده توسط Jason Tang
والد 3f5d248508
کامیت e94aec09bd
13فایلهای تغییر یافته به همراه49 افزوده شده و 123 حذف شده
@@ -73,8 +73,7 @@ bool Program::initClBinary(char* binaryIn, size_t size) {
char* decryptedBin;
size_t decryptedSize;
if (!clBinary()->decryptElf(binaryIn, size, &decryptedBin, &decryptedSize, &encryptCode)) {
buildLog_ += "Decrypting ELF Failed ";
buildLog_ += "\n";
buildLog_ += "Decrypting ELF Failed\n";
return false;
}
if (decryptedBin != nullptr) {
@@ -86,11 +85,8 @@ bool Program::initClBinary(char* binaryIn, size_t size) {
// Both 32-bit and 64-bit are allowed!
if (!amd::Elf::isElfMagic(bin)) {
// Invalid binary.
if (decryptedBin != nullptr) {
delete[] decryptedBin;
}
buildLog_ += "Elf Magic failed";
buildLog_ += "\n";
delete[] decryptedBin;
buildLog_ += "Elf Magic failed\n";
return false;
}