aboutsummaryrefslogtreecommitdiff
path: root/coreutils/test.c
diff options
context:
space:
mode:
authorkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-09-13 02:46:14 +0000
committerkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-09-13 02:46:14 +0000
commit9f559aa7068b38ba510640873a58953e94139248 (patch)
tree5b967e1d873ff6eff8296bf9fda73825f0c55884 /coreutils/test.c
parent033cbe20a6a0389007a333a4fdf1dc87d8eb368e (diff)
downloadbusybox-w32-9f559aa7068b38ba510640873a58953e94139248.tar.gz
busybox-w32-9f559aa7068b38ba510640873a58953e94139248.tar.bz2
busybox-w32-9f559aa7068b38ba510640873a58953e94139248.zip
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. git-svn-id: svn://busybox.net/trunk/busybox@1039 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'coreutils/test.c')
-rw-r--r--coreutils/test.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/coreutils/test.c b/coreutils/test.c
index 6dde718c7..a2bec4492 100644
--- a/coreutils/test.c
+++ b/coreutils/test.c
@@ -555,9 +555,7 @@ static void
555initialize_group_array () 555initialize_group_array ()
556{ 556{
557 ngroups = getgroups(0, NULL); 557 ngroups = getgroups(0, NULL);
558 if ((group_array = realloc(group_array, ngroups * sizeof(gid_t))) == NULL) 558 group_array = xrealloc(group_array, ngroups * sizeof(gid_t));
559 fatalError("Out of space\n");
560
561 getgroups(ngroups, group_array); 559 getgroups(ngroups, group_array);
562} 560}
563 561