sManagedEnviron is already checked for NULL value in free_variables()

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26830 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2008-08-05 22:06:21 +00:00
parent 65f1e8eceb
commit 43619079f8

View File

@ -130,10 +130,8 @@ copy_environ_to_heap_if_needed(void)
if (environ == sManagedEnviron)
return B_OK;
if (sManagedEnviron != NULL) {
// free previously used "environ"; it has been changed by an application
free_variables();
}
// free previously used "environ" if it has been changed by an application
free_variables();
sManagedEnviron = malloc((count_variables() + 1) * sizeof(char *));
if (sManagedEnviron == NULL)