projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d7f696e
)
Fix memory leak found by clang static analyzer.
author
Ted Kremenek
<kremenek@apple.com>
Fri, 14 Jan 2011 22:34:17 +0000
(22:34 +0000)
committer
Ted Kremenek
<kremenek@apple.com>
Fri, 14 Jan 2011 22:34:17 +0000
(22:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123487
91177308
-0d34-0410-b5e6-
96231b3b80d8
tools/llvm-ld/llvm-ld.cpp
patch
|
blob
|
history
diff --git
a/tools/llvm-ld/llvm-ld.cpp
b/tools/llvm-ld/llvm-ld.cpp
index 475fcf4d8ac8c9838177f3c4fec8f480b532ffe2..442c4da5697a4a8876ca458e991f061d095b544b 100644
(file)
--- 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.