diff options
author | Matt Kraai <kraai@debian.org> | 2000-09-13 02:46:14 +0000 |
---|---|---|
committer | Matt Kraai <kraai@debian.org> | 2000-09-13 02:46:14 +0000 |
commit | 322ae93a5e0b78b65831f9fd87fd456eb84d21a1 (patch) | |
tree | 5b967e1d873ff6eff8296bf9fda73825f0c55884 /test.c | |
parent | b89075298edf0a471b9046b1f3c8a936e18ead20 (diff) | |
download | busybox-w32-322ae93a5e0b78b65831f9fd87fd456eb84d21a1.tar.gz busybox-w32-322ae93a5e0b78b65831f9fd87fd456eb84d21a1.tar.bz2 busybox-w32-322ae93a5e0b78b65831f9fd87fd456eb84d21a1.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.
Diffstat (limited to 'test.c')
-rw-r--r-- | test.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -555,9 +555,7 @@ static void | |||
555 | initialize_group_array () | 555 | initialize_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 | ||