Document the memory leak that is inherent in FreeBSD's semantics
for getenv()/putenv(). PR: 10341 5604
This commit is contained in:
parent
61a8d345c8
commit
56efeca19a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user