Skip to content

Commit 1bdf13e

Browse files
stefan-iligcbot
authored andcommitted
Fix memory leak in BiFManager
We were releasing memory from unique pointer but not freeing it after.
1 parent 36de542 commit 1bdf13e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

IGC/BiFManager/BiFManagerHandler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ void BiFManagerHandler::preapareBiFSections(llvm::Module& pMainModule, TFunction
263263

264264
// Attach a MemoryBuffer in this place
265265
auto bifMemBuffer = llvm::MemoryBuffer::getMemBuffer(
266-
llvm::StringRef(bifModuleBegin, record->bufferSize), "", false).release();
266+
llvm::StringRef(bifModuleBegin, record->bufferSize), "", false);
267267

268268
// Read this llvm module
269269
llvm::Expected<std::unique_ptr<llvm::Module>> ModuleOrErr =

0 commit comments

Comments
 (0)