diff --git a/projects/clr/hipamd/src/hip_fatbin.cpp b/projects/clr/hipamd/src/hip_fatbin.cpp index 2a1c1777b4..dc76883f28 100644 --- a/projects/clr/hipamd/src/hip_fatbin.cpp +++ b/projects/clr/hipamd/src/hip_fatbin.cpp @@ -51,6 +51,13 @@ FatBinaryInfo::FatBinaryInfo(const char* fname, const void* image) : fdesc_(amd: FatBinaryInfo::~FatBinaryInfo() { + // Release per device fat bin info. + for (auto* fbd: fatbin_dev_info_) { + if (fbd != nullptr) { + delete fbd; + } + } + if (!HIP_USE_RUNTIME_UNBUNDLER) { // Using COMGR Unbundler if (ufd_ && amd::Os::isValidFileDesc(ufd_->fdesc_)) { @@ -422,4 +429,4 @@ hipError_t FatBinaryInfo::BuildProgram(const int device_id) { return hipSuccess; } -} //namespace : hip \ No newline at end of file +} //namespace : hip