From owner-svn-src-all@FreeBSD.ORG Tue Jul 2 19:28:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4AA4F9D8 for ; Tue, 2 Jul 2013 19:28:10 +0000 (UTC) (envelope-from florent@peterschmitt.fr) Received: from peterschmitt.fr (peterschmitt.fr [5.135.177.31]) by mx1.freebsd.org (Postfix) with ESMTP id 166E810B5 for ; Tue, 2 Jul 2013 19:28:09 +0000 (UTC) Received: from localhost.localdomain (4ab54-4-88-163-248-31.fbx.proxad.net [88.163.248.31]) by peterschmitt.fr (Postfix) with ESMTPSA id 6C1CA667A for ; Tue, 2 Jul 2013 21:28:04 +0200 (CEST) Message-ID: <51D329BB.7010000@peterschmitt.fr> Date: Tue, 02 Jul 2013 21:27:55 +0200 From: Florent Peterschmitt User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: svn-src-all@freebsd.org Subject: Re: svn commit: r252514 - head/sbin/swapon References: <201307021734.r62HYZ0V020447@svn.freebsd.org> In-Reply-To: <201307021734.r62HYZ0V020447@svn.freebsd.org> X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2BUHAFIJVVTGUGVTAARLJ" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2013 19:28:10 -0000 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--