SWDEV-1 - Some 'delete' clean up

Change-Id: I02564f0f0e349375bde1471e9f82df268703367b
This commit is contained in:
Jason Tang
2021-09-06 17:55:09 -04:00
committed by Jason Tang
parent 5549007856
commit 73967c3b17
13 changed files with 49 additions and 123 deletions
+3 -7
View File
@@ -1426,10 +1426,8 @@ bool Program::initClBinary() {
// ================================================================================================
void Program::releaseClBinary() {
if (clBinary_ != nullptr) {
delete clBinary_;
clBinary_ = nullptr;
}
delete clBinary_;
clBinary_ = nullptr;
}
// ================================================================================================
@@ -2171,9 +2169,7 @@ bool Program::initClBinary(const char* binaryIn, size_t size, amd::Os::FileDesc
if (!isElf(bin)) {
// Invalid binary.
if (decryptedBin != nullptr) {
delete[] decryptedBin;
}
delete[] decryptedBin;
DevLogError("Bin is not ELF \n");
return false;
}