From owner-freebsd-stable Wed Sep 25 16:14:53 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6D8EF37B401 for ; Wed, 25 Sep 2002 16:14:52 -0700 (PDT) Received: from tp.databus.com (p70-227.acedsl.com [66.114.70.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id C65D343E65 for ; Wed, 25 Sep 2002 16:14:51 -0700 (PDT) (envelope-from barney@tp.databus.com) Received: from tp.databus.com (localhost.databus.com [127.0.0.1]) by tp.databus.com (8.12.6/8.12.6) with ESMTP id g8PNEfE0009075; Wed, 25 Sep 2002 19:14:41 -0400 (EDT) (envelope-from barney@tp.databus.com) Received: (from barney@localhost) by tp.databus.com (8.12.6/8.12.6/Submit) id g8PNEfkb009074; Wed, 25 Sep 2002 19:14:41 -0400 (EDT) Date: Wed, 25 Sep 2002 19:14:41 -0400 From: Barney Wolff To: David Schultz Cc: Peter Jeremy , stable@FreeBSD.ORG Subject: Re: [v]asprintf leaks memory Message-ID: <20020925231441.GA8968@tp.databus.com> References: <20020925133219.GA59210@HAL9000.homeunix.com> <20020925214322.GL495@gsmx07.alcatel.com.au> <20020925230236.GA60375@HAL9000.homeunix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020925230236.GA60375@HAL9000.homeunix.com> User-Agent: Mutt/1.4i X-Scanned-By: MIMEDefang 2.21 (www . roaringpenguin . com / mimedefang) Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Sep 25, 2002 at 04:02:37PM -0700, David Schultz wrote: > > I don't really care one way or the other, but regardless of what > the manpage says, reallocf()'s semantics should probably match the > way it's already used. Maybe what I found was an isolated bug and > reallocf() DTRT already. In that case, the patch I posted should > probably be applied. Could you please explain exactly how the original code leaks memory? Maybe I'm being dense today but I just don't see it. If reallocf returns NULL the original buffer has been freed. -- Barney Wolff I'm available by contract or FT: http://www.databus.com/bwresume.pdf To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message