Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 02 Jul 2013 21:27:55 +0200
From:      Florent Peterschmitt <florent@peterschmitt.fr>
To:        svn-src-all@freebsd.org
Subject:   Re: svn commit: r252514 - head/sbin/swapon
Message-ID:  <51D329BB.7010000@peterschmitt.fr>
In-Reply-To: <201307021734.r62HYZ0V020447@svn.freebsd.org>
References:  <201307021734.r62HYZ0V020447@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
------enig2BUHAFIJVVTGUGVTAARLJ
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Le 02/07/2013 19:34, Xin LI a =E9crit :
> Author: delphij
> Date: Tue Jul  2 17:34:34 2013
> New Revision: 252514
> URL: http://svnweb.freebsd.org/changeset/base/252514
>=20
> Log:
>   Plug a memory leak.
>=20
> Modified:
>   head/sbin/swapon/swapon.c
>=20
> Modified: head/sbin/swapon/swapon.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/sbin/swapon/swapon.c	Tue Jul  2 17:17:42 2013	(r252513)
> +++ head/sbin/swapon/swapon.c	Tue Jul  2 17:34:34 2013	(r252514)

Hi,

Wouldn't be simpler to do a "goto" somewhere in the code to do the
free() and return(NULL) instead of copying those instructions at each cas=
e ?

It's just a question.

--=20
Florent Peterschmitt           | Please:
florent@peterschmitt.fr        |  * Avoid HTML/RTF in E-mail.
+33 (0)6 64 33 97 92           |  * Send PDF for documents.
http://florent.peterschmitt.fr | Thank you :)


------enig2BUHAFIJVVTGUGVTAARLJ
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJR0ym/AAoJEMtO2Sol0IIm7kcH/3qkD2CqZC8jW/a5iLgnGHm7
JjgwmzxYbo4LHVRQBziAV7JuRdijzuUyxSdi1eXUGOT/0MbU5IjVbp2NTFXWGx7t
LZD8m2MaxCAFvPKtEgNPi8CfPCZAi9p9nSZamsHrlIY6GBV4bdPdUbw9CxeCxHqT
sjR6Ijq3Y9W+ZVC1oubMi1/aPpKMK0z8htZ8YdquUMO8y4js4DfNhWhACu4N6pwT
xLyQQPdIZ8jiUbcmGnG+Bh587p2EFpylcyyF6XL4q7i2Mzhzo3hTz8YKmDEL+8+j
6vaphckkOuPvN386DEHteOJNkfdyPQDAVGXwYkf80mw9X+Ik8i4rTAzPqQQjhsQ=
=fceF
-----END PGP SIGNATURE-----

------enig2BUHAFIJVVTGUGVTAARLJ--



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