mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
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
This commit is contained in:
parent
d7f696edec
commit
7cefd0e9d5
@ -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…
Reference in New Issue
Block a user