From owner-cvs-all Thu Jul 19 12:45: 4 2001 Delivered-To: cvs-all@freebsd.org Received: from obsecurity.dyndns.org (adsl-63-207-60-215.dsl.lsan03.pacbell.net [63.207.60.215]) by hub.freebsd.org (Postfix) with ESMTP id 48DC837B401; Thu, 19 Jul 2001 12:44:52 -0700 (PDT) (envelope-from kris@obsecurity.org) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 02E0F66C4D; Thu, 19 Jul 2001 12:44:50 -0700 (PDT) Date: Thu, 19 Jul 2001 12:44:50 -0700 From: Kris Kennaway To: Mikhail Teterin Cc: dima@unixfreak.org, kris@FreeBSD.org, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/mailwrapper mailwrapper.c Message-ID: <20010719124450.A45896@xor.obsecurity.org> References: <20010719144945.0B1AA3E2F@bazooka.unixfreak.org> <200107191628.f6JGSIO33402@aldan.algebra.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="gBBFr7Ir9EOA20Yy" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200107191628.f6JGSIO33402@aldan.algebra.com>; from mi@aldan.algebra.com on Thu, Jul 19, 2001 at 12:28:15PM -0400 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --gBBFr7Ir9EOA20Yy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 19, 2001 at 12:28:15PM -0400, Mikhail Teterin wrote: > On 19 Jul, Dima Dorfman wrote: > > Mikhail Teterin writes: > >> On 18 Jul, Kris Kennaway wrote: > >> > kris 2001/07/18 22:04:46 PDT > >> >=20 > >> > Modified files: (Branch: RELENG_4) > >> > usr.sbin/mailwrapper mailwrapper.c=20 > >> > Log: > >> > MFC: r1.6: You can't free a string and then use it as the error > >> > message to errx. Instead use warn to print the string, then > >> > cleanup and exit normally. > [...] > >> It was not there before, I guess, because the "founding fathers" did > >> not concern themselves with the fate of the allocated memory after > >> exit :-) > > > > Maybe I'm missing something, but who cares about allocated memory > > *after* *exit*? >=20 > Well, may be *I* am missing something, but this seems to be the point of > the way Kris fixed the problem -- the string was beeing freed and then > passed to errx. Obviously wrong. Instead of just removing the free(), he > replaced the errx with warn (before the free()) and exit (after free()). >=20 > (Personally, I wouldn't care either. I don't think, it is a sign of a > good programmer to care about this.) Just to be clear, I didn't make the original commit (that was Paul), I just MFCed it :-) Kris --gBBFr7Ir9EOA20Yy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE7VzixWry0BWjoQKURAq8TAJ9hsiM2Y6oh1Gs4pRtqZy0068qNHgCeJ+c8 TD5wCeYEcJXi8vLQWDcJp2k= =ahb9 -----END PGP SIGNATURE----- --gBBFr7Ir9EOA20Yy-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message