diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2012-12-28 20:30:04 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2012-12-28 20:30:04 +0000 |
commit | e7ae79563ae6e4b961c2343f08df0900b302c822 (patch) | |
tree | fc70aa0845adfaa63aab6ea9be84abc6bf99ff8c /libutil | |
parent | a4ba8cb5d1a040d3dea01a404d49e2bee012a6b5 (diff) | |
download | pw-darwin-e7ae79563ae6e4b961c2343f08df0900b302c822.tar.gz pw-darwin-e7ae79563ae6e4b961c2343f08df0900b302c822.tar.zst pw-darwin-e7ae79563ae6e4b961c2343f08df0900b302c822.zip |
errno = ENOMEM was supposed to be removed not return (NULL);
Submitted by: gcooper
Diffstat (limited to 'libutil')
-rw-r--r-- | libutil/gr_util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libutil/gr_util.c b/libutil/gr_util.c index 6676720..5f803af 100644 --- a/libutil/gr_util.c +++ b/libutil/gr_util.c @@ -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; |