Document the memory leak that is inherent in FreeBSD's semantics

for getenv()/putenv().

PR:	10341 5604
This commit is contained in:
archie 2000-01-26 22:10:56 +00:00
parent 61a8d345c8
commit 56efeca19a

View File

@ -139,6 +139,21 @@ The
.Fn getenv
function conforms to
.St -ansiC .
.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. The FreeBSD semantics for these functions
(namely, that the contents of
.Ar value
are copied and that old values remain accessible indefinitely) make this
bug unavoidable. Future versions may eliminate one or both of these
semantic guarantees in order to fix the bug.
.Sh HISTORY
The functions
.Fn setenv