Fix calls to {m,c,re}alloc so that they use x{m,c,re}alloc instead of

segfaulting or handling errors the same way themselves.
This commit is contained in:
Matt Kraai
2000-09-13 02:46:14 +00:00
parent b89075298e
commit 322ae93a5e
25 changed files with 70 additions and 108 deletions

View File

@ -555,9 +555,7 @@ static void
initialize_group_array ()
{
ngroups = getgroups(0, NULL);
if ((group_array = realloc(group_array, ngroups * sizeof(gid_t))) == NULL)
fatalError("Out of space\n");
group_array = xrealloc(group_array, ngroups * sizeof(gid_t));
getgroups(ngroups, group_array);
}