llvm.org GIT mirror llvm / 1a9908d
llvm-nm: Don't leak bitcode buffers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141534 91177308-0d34-0410-b5e6-96231b3b80d8 Benjamin Kramer 8 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
329329 OwningPtr child;
330330 if (error_code ec = i->getAsBinary(child)) {
331331 // Try opening it as a bitcode file.
332 MemoryBuffer *buff = i->getBuffer();
332 OwningPtr buff(i->getBuffer());
333333 Module *Result = 0;
334334 if (buff)
335 Result = ParseBitcodeFile(buff, Context, &ErrorMessage);
335 Result = ParseBitcodeFile(buff.get(), Context, &ErrorMessage);
336336
337337 if (Result) {
338338 DumpSymbolNamesFromModule(Result);