diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-01-14 22:34:17 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-01-14 22:34:17 +0000 |
commit | 7cefd0e9d596e0adc45b693d3f18d53ed0db259b (patch) | |
tree | c18e41f025b475e1e6e81030ee1be6cd58583f17 /tools | |
parent | d7f696edecd6f015acbea97257653662378a15b7 (diff) | |
download | external_llvm-7cefd0e9d596e0adc45b693d3f18d53ed0db259b.zip external_llvm-7cefd0e9d596e0adc45b693d3f18d53ed0db259b.tar.gz external_llvm-7cefd0e9d596e0adc45b693d3f18d53ed0db259b.tar.bz2 |
Fix memory leak found by clang static analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123487 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/llvm-ld/llvm-ld.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/llvm-ld/llvm-ld.cpp b/tools/llvm-ld/llvm-ld.cpp index 475fcf4..442c4da 100644 --- a/tools/llvm-ld/llvm-ld.cpp +++ b/tools/llvm-ld/llvm-ld.cpp @@ -178,7 +178,7 @@ static char ** CopyEnv(char ** const envp) { // Allocate a new environment list. char **newenv = new char* [entries]; - if ((newenv = new char* [entries]) == NULL) + if (newenv == NULL) return NULL; // Make a copy of the list. Don't forget the NULL that ends the list. |