HomePhabricator

[Clang][Bundler] Fix for a potential memory leak [NFC]

Description

[Clang][Bundler] Fix for a potential memory leak [NFC]

Bundler leaks memory if it is called with -type=o but given input isn't an object file (though it has to have a known binary type like IR, archive, etc...). Memory leak is happening when binary object returned by the createBinary(...) call cannot be casted to an ObjectFile type. In this case returned BinaryOrErr object releases ownership of the binary, but no one is taking it (see line 626).

Differential Revision: https://reviews.llvm.org/D67416

Details

Committed
sdmitrievSep 11 2019, 9:03 AM
Differential Revision
D67416: [Clang][Bundler] Fix for a potential memory leak [NFC]
Parents
rL371632: Request commit access for asb
Branches
Unknown
Tags
Unknown