diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2009-09-10 14:56:31 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2009-09-10 14:56:31 +0000 |
commit | 8018f5d5a4134f8b2ceb315095996a552a80ee25 (patch) | |
tree | 36b527ff5716308ee0a678c31eae1486228727cf /tools/llvm-nm | |
parent | b84c5ae3d4d34d2e4cafbd7c1281de771b813a09 (diff) | |
download | external_llvm-8018f5d5a4134f8b2ceb315095996a552a80ee25.zip external_llvm-8018f5d5a4134f8b2ceb315095996a552a80ee25.tar.gz external_llvm-8018f5d5a4134f8b2ceb315095996a552a80ee25.tar.bz2 |
fix leakage of Module
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81445 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-nm')
-rw-r--r-- | tools/llvm-nm/llvm-nm.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/llvm-nm/llvm-nm.cpp b/tools/llvm-nm/llvm-nm.cpp index 325b0ac..2baf532 100644 --- a/tools/llvm-nm/llvm-nm.cpp +++ b/tools/llvm-nm/llvm-nm.cpp @@ -145,12 +145,11 @@ static void DumpSymbolNamesFromFile(std::string &Filename) { if (Buffer.get()) Result = ParseBitcodeFile(Buffer.get(), Context, &ErrorMessage); - if (Result) + if (Result) { DumpSymbolNamesFromModule(Result); - else { + delete Result; + } else errs() << ToolName << ": " << Filename << ": " << ErrorMessage << "\n"; - return; - } } else if (aPath.isArchive()) { std::string ErrMsg; |