Fix previous commit.

This commit is contained in:
Ondřej Bílka 2014-02-10 14:22:31 +01:00
parent f3d338c9f3
commit 1448f32447
1 changed files with 5 additions and 0 deletions

View File

@ -146,6 +146,11 @@ __add_to_environ (name, value, combined, replace)
UNLOCK;
return -1;
}
if (__environ != last_environ)
memcpy ((char *) new_environ, (char *) __environ,
size * sizeof (char *));
new_environ[size] = NULL;
new_environ[size + 1] = NULL;
ep = new_environ + size;