summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-05-14 19:17:28 +0000
committerChris Lattner <sabre@nondot.org>2006-05-14 19:17:28 +0000
commitc78098291e1871d55af297cd8448a23a1f1b616d (patch)
tree7d195c79baa26932b9cd87813d772f2f553a9c3e /tools
parent53bd1b9de74247acae27328cef95bd3888f6cd4d (diff)
downloadllvm-c78098291e1871d55af297cd8448a23a1f1b616d.tar.gz
llvm-c78098291e1871d55af297cd8448a23a1f1b616d.tar.bz2
llvm-c78098291e1871d55af297cd8448a23a1f1b616d.tar.xz
Free memory allocated by copy_env.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28299 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/gccld/GenerateCode.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/gccld/GenerateCode.cpp b/tools/gccld/GenerateCode.cpp
index 9dffe332e4..967fbf0b80 100644
--- a/tools/gccld/GenerateCode.cpp
+++ b/tools/gccld/GenerateCode.cpp
@@ -438,7 +438,9 @@ int llvm::GenerateNative(const std::string &OutputFilename,
// Run the compiler to assembly and link together the program.
if (Verbose) dumpArgs(&args[0]);
- int Res = sys::Program::ExecuteAndWait(gcc, &args[0], (const char**)clean_env);
+ int Res = sys::Program::ExecuteAndWait(gcc, &args[0],(const char**)clean_env);
+
+ delete [] clean_env;
while (!StringsToDelete.empty()) {
free(StringsToDelete.back());