Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Jan 2000 12:50:03 -0800 (PST)
From:      Peter Jeremy <peter.jeremy@alcatel.com.au>
To:        freebsd-bugs@FreeBSD.org
Subject:   bin/5604: setenv(3) function has memory leak, other bugs
Message-ID:  <200001262050.MAA47624@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/5604; it has been noted by GNATS.

From: Peter Jeremy <peter.jeremy@alcatel.com.au>
To: archie@whistle.com
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: bin/5604: setenv(3) function has memory leak, other bugs
Date: Thu, 27 Jan 2000 07:49:45 +1100

 In view of the upcoming 4.0-RELEASE freeze, together with the apparent
 impossibility to implement a setenv(3) that doesn't have memory leaks,
 could you please consider committing the following patch which at
 least documents the problem.  I would be satisfied with this as a `fix'
 for PR bin/10341 (though it doesn't address the second part of bin/5604).
 
 Index: src/lib/libc/stdlib/getenv.3
 ===================================================================
 RCS file: /home/CVSROOT/src/lib/libc/stdlib/getenv.3,v
 retrieving revision 1.3
 diff -u -r1.3 getenv.3
 --- src/lib/libc/stdlib/getenv.3	1999/08/28 00:01:31	1.3
 +++ src/lib/libc/stdlib/getenv.3	1999/10/05 06:26:19
 @@ -150,3 +150,13 @@
  .Fn putenv
  function appeared in
  .Bx 4.3 Reno .
 +.Sh BUGS
 +Successive calls to
 +.Fn setenv
 +or
 +.Fn putenv
 +assigning a differently sized
 +.Ar value
 +to the same
 +.Ar name
 +will result in a memory leak.
 
 Peter
 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200001262050.MAA47624>