On Fri, Dec 28, 2012 at 12:22:54PM -0800, Garrett Cooper wrote: > On Fri, Dec 28, 2012 at 12:21 PM, Baptiste Daroussin <[email protected]> wrote: > > Author: bapt > > Date: Fri Dec 28 20:21:14 2012 > > New Revision: 244778 > > URL: http://svnweb.freebsd.org/changeset/base/244778 > > > > Log: > > malloc() sets errno to ENOMEM already. > > > > Submitted by: Christoph Mallon <[email protected]> > > > > Modified: > > head/lib/libutil/gr_util.c > > > > Modified: head/lib/libutil/gr_util.c > > ============================================================================== > > --- head/lib/libutil/gr_util.c Fri Dec 28 20:19:54 2012 (r244777) > > +++ head/lib/libutil/gr_util.c Fri Dec 28 20:21:14 2012 (r244778) > > @@ -505,17 +505,13 @@ 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) { > > + if ((members = malloc(mlen)) == NULL) > > errno = ENOMEM; > > - return (NULL); > > - } > > Didn't you mean to remove errno = ENOMEM?
Thank you, fixed. Bapt
pgpgZFmhmkwKs.pgp
Description: PGP signature
