From owner-freebsd-current Thu Aug 6 04:10:50 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA16835 for freebsd-current-outgoing; Thu, 6 Aug 1998 04:10:50 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.15.68.22]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA16826 for ; Thu, 6 Aug 1998 04:10:40 -0700 (PDT) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id VAA13616; Thu, 6 Aug 1998 21:10:20 +1000 Date: Thu, 6 Aug 1998 21:10:20 +1000 From: Bruce Evans Message-Id: <199808061110.VAA13616@godzilla.zeta.org.au> To: dg@root.com, freebsd@xaa.iae.nl Subject: Re: memory leaks in libc Cc: freebsd-current@FreeBSD.ORG Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > The problem with fixing setenv() is that you don't know if a pointer was >malloced, allocated from the env area above the stack, points to read-only >text, points to a static data buffer, etc. There really is no way to know >for sure, so you can't free the memory. Yo can know if you malloced it in a previous call to putenv() or setenv(). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message