diff options
author | Chris Lattner <sabre@nondot.org> | 2006-05-14 18:38:13 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-05-14 18:38:13 +0000 |
commit | 2f86362af8a404d326acd85c4803d5538c47b689 (patch) | |
tree | aa5cb63aef6bdf37053747a1f6b1649747f565ca /tools/llvm-ld/llvm-ld.cpp | |
parent | ff8953ae6d417fb28b8eb2a5a212cb34eafa0e42 (diff) |
Delete memory allocated by CopyEnv
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28288 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-ld/llvm-ld.cpp')
-rw-r--r-- | tools/llvm-ld/llvm-ld.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/llvm-ld/llvm-ld.cpp b/tools/llvm-ld/llvm-ld.cpp index 46fd291476..1900cc9866 100644 --- a/tools/llvm-ld/llvm-ld.cpp +++ b/tools/llvm-ld/llvm-ld.cpp @@ -312,7 +312,9 @@ static int GenerateNative(const std::string &OutputFilename, args.push_back(0); // Run the compiler to assembly and link together the program. - return sys::Program::ExecuteAndWait(gcc, &args[0], (const char**)clean_env); + int R = sys::Program::ExecuteAndWait(gcc, &args[0], (const char**)clean_env); + delete [] clean_env; + return R; } /// EmitShellScript - Output the wrapper file that invokes the JIT on the LLVM |