summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/getenv.3
diff options
context:
space:
mode:
authorArchie Cobbs <archie@FreeBSD.org>2000-01-26 22:10:56 +0000
committerArchie Cobbs <archie@FreeBSD.org>2000-01-26 22:10:56 +0000
commit5059d6a6014824b0b2abd1dccf80b4c5b5ddae18 (patch)
treeaace4e89791212c46e338f42b8b4d3ad71cc00d6 /lib/libc/stdlib/getenv.3
parentc9ef26814c33b33d3302194297fb3cfabf2deba6 (diff)
Notes
Diffstat (limited to 'lib/libc/stdlib/getenv.3')
-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 3347bda08441..aff0d7d1b1ff 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