Skip to content
Commit 0c1257f5 authored by Sergey Dmitriev's avatar Sergey Dmitriev
Browse files

[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

llvm-svn: 371633
parent 1be63404
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment