From owner-cvs-all Thu Jul 19 7:40:50 2001 Delivered-To: cvs-all@freebsd.org Received: from aldan.algebra.com (aldan.algebra.com [216.254.65.224]) by hub.freebsd.org (Postfix) with ESMTP id 06B6B37B403; Thu, 19 Jul 2001 07:40:44 -0700 (PDT) (envelope-from mi@aldan.algebra.com) Received: from aldan.algebra.com (localhost [127.0.0.1]) by aldan.algebra.com (8.11.4/8.11.4) with ESMTP id f6JEedO32662; Thu, 19 Jul 2001 10:40:40 -0400 (EDT) (envelope-from mi@aldan.algebra.com) Message-Id: <200107191440.f6JEedO32662@aldan.algebra.com> Date: Thu, 19 Jul 2001 10:40:36 -0400 (EDT) From: Mikhail Teterin Subject: Re: cvs commit: src/usr.sbin/mailwrapper mailwrapper.c To: kris@FreeBSD.org Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org In-Reply-To: <200107190504.f6J54ka10016@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=US-ASCII 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 On 18 Jul, Kris Kennaway wrote: > kris 2001/07/18 22:04:46 PDT > > Modified files: (Branch: RELENG_4) > usr.sbin/mailwrapper mailwrapper.c > 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. This is not the first place to have this issue (I remember a similar commit from the past). May be, it is time to add another err* function, which will free the passed error message prior to exiting? It was not there before, I guess, because the "founding fathers" did not concern themselves with the fate of the allocated memory after exit :-) -- |\__-----__/| _____/ ::::: :::\_____ '__--( ::::::::..::)--__` -mi If you have a / _- \/ :::::::\/ -_ serious knowledge / / :. .::::\ \ about computers -- | ::::::::::::| Ok, let's say you broke keep it in a secret! _|/ ::::____::\|_ the wall with your head "Rules of dating", / /:::::/:_::\::\:.\ What are you going to 'Playboy', ? 1994 | :| ..:(_/ \::|::|::| do in the next cell? | :|:::::. ::|: |::|.:| Stanislaw J. Lec \ |:: :::_/::/: :|:/ ((___\____\____/___/___)) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message