(split_groups): Test the pointer returned by malloc.
This commit is contained in:
parent
6f45325d6e
commit
631fa3b4f3
@ -1,3 +1,7 @@
|
||||
2008-01-01 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* lib/groupio.c (split_groups): Test the pointer returned by malloc.
|
||||
|
||||
2008-01-01 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* lib/commonio.c: Document add_one_entry_nis(), write_all(),
|
||||
|
@ -332,6 +332,10 @@ static int split_groups (unsigned int max_members)
|
||||
continue;
|
||||
|
||||
new = (struct commonio_entry *) malloc (sizeof *new);
|
||||
if (NULL == new) {
|
||||
errno = ENOMEM;
|
||||
return 0;
|
||||
}
|
||||
new->eptr = group_dup(gr->eptr);
|
||||
if (NULL == new->eptr) {
|
||||
errno = ENOMEM;
|
||||
|
Loading…
Reference in New Issue
Block a user