mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-03-01 00:35:43 +00:00
Fix memory leak found by clang static analyzer.
llvm-svn: 123487
This commit is contained in:
parent
4b09cdedb2
commit
a81e8e4f91
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user