Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Dec 2012 21:31:28 +0100
From:      Baptiste Daroussin <bapt@freebsd.org>
To:        Garrett Cooper <yanegomi@gmail.com>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r244778 - head/lib/libutil
Message-ID:  <20121228203128.GF48771@ithaqua.etoilebsd.net>
In-Reply-To: <CAGH67wQ8t1bPt4TxzvTzsfH8DA4vMd_k3%2Bwv08yFEvys=uxxdQ@mail.gmail.com>
References:  <201212282021.qBSKLEeG096326@svn.freebsd.org> <CAGH67wQ8t1bPt4TxzvTzsfH8DA4vMd_k3%2Bwv08yFEvys=uxxdQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--O98KdSgI27dgYlM5
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Dec 28, 2012 at 12:22:54PM -0800, Garrett Cooper wrote:
> On Fri, Dec 28, 2012 at 12:21 PM, Baptiste Daroussin <bapt@freebsd.org> w=
rote:
> > 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 <christoph.mallon@gmx.de>
> >
> > Modified:
> >   head/lib/libutil/gr_util.c
> >
> > Modified: head/lib/libutil/gr_util.c
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
> > --- head/lib/libutil/gr_util.c  Fri Dec 28 20:19:54 2012        (r24477=
7)
> > +++ head/lib/libutil/gr_util.c  Fri Dec 28 20:21:14 2012        (r24477=
8)
> > @@ -505,17 +505,13 @@ gr_add(struct group *gr, char *newmember
> >         }
> >         /* Allocate enough for current pointers + 1 more and NULL marke=
r */
> >         mlen =3D (num_mem + 2) * sizeof(*gr->gr_mem);
> > -       if ((members =3D malloc(mlen)) =3D=3D NULL) {
> > +       if ((members =3D malloc(mlen)) =3D=3D NULL)
> >                 errno =3D ENOMEM;
> > -               return (NULL);
> > -       }
>=20
>     Didn't you mean to remove errno =3D ENOMEM?

Thank you, fixed.

Bapt

--O98KdSgI27dgYlM5
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iEYEARECAAYFAlDeAZ8ACgkQ8kTtMUmk6Ez1EQCfRLU5vTJV4Si+uPqrHavpobDE
oKgAn2Gg4w7uXdSrKUQ/KT+Dzb+Wu/Vo
=8zd5
-----END PGP SIGNATURE-----

--O98KdSgI27dgYlM5--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121228203128.GF48771>