svn commit: r244779 - head/lib/libutil
Baptiste Daroussin
bapt at FreeBSD.org
Fri Dec 28 20:30:05 UTC 2012
Author: bapt
Date: Fri Dec 28 20:30:04 2012
New Revision: 244779
URL: http://svnweb.freebsd.org/changeset/base/244779
Log:
errno = ENOMEM was supposed to be removed not return (NULL);
Submitted by: gcooper
Modified:
head/lib/libutil/gr_util.c
Modified: head/lib/libutil/gr_util.c
==============================================================================
--- head/lib/libutil/gr_util.c Fri Dec 28 20:21:14 2012 (r244778)
+++ head/lib/libutil/gr_util.c Fri Dec 28 20:30:04 2012 (r244779)
@@ -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;
More information about the svn-src-all
mailing list