errno = ENOMEM was supposed to be removed not return (NULL);
Submitted by: gcooper
This commit is contained in:
parent
d00489b70f
commit
fe390747e4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=244779
@ -506,7 +506,7 @@ gr_add(struct group *gr, char *newmember)
|
||||
/* Allocate enough for current pointers + 1 more and NULL marker */
|
||||
mlen = (num_mem + 2) * sizeof(*gr->gr_mem);
|
||||
if ((members = malloc(mlen)) == NULL)
|
||||
errno = ENOMEM;
|
||||
return (NULL);
|
||||
memcpy(members, gr->gr_mem, num_mem * sizeof(*gr->gr_mem));
|
||||
members[num_mem++] = newmember;
|
||||
members[num_mem] = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user