summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/stdlib/getenv.315
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/libc/stdlib/getenv.3 b/lib/libc/stdlib/getenv.3
index 3347bda..aff0d7d 100644
--- a/lib/libc/stdlib/getenv.3
+++ b/lib/libc/stdlib/getenv.3
@@ -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
OpenPOWER on IntegriCloud