mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 04:29:21 +00:00
Replaced the call to strdup() with a new operator followed by a strcpy().
This should prevent calls to the new oerator and malloc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8587 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
83ca6ec8a3
commit
a589d31faa
@ -382,7 +382,8 @@ copy_env (char ** const envp)
|
||||
entries = 0;
|
||||
while (envp[entries] != NULL)
|
||||
{
|
||||
newenv[entries] = strdup (envp[entries]);
|
||||
newenv[entries] = new char[strlen (envp[entries]) + 1];
|
||||
strcpy (newenv[entries], envp[entries]);
|
||||
++entries;
|
||||
}
|
||||
newenv[entries] = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user