From 81e4e6a2d644539f199cbe73a6ffff8c46823be9 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Wed, 16 Dec 1998 04:39:23 +0000 Subject: [PATCH] Add reminder to return memory allocated by this call. Obtained from: OpenBSD --- lib/libc/gen/setmode.3 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/libc/gen/setmode.3 b/lib/libc/gen/setmode.3 index 4c85b30e2a38..bc38fd3e1193 100644 --- a/lib/libc/gen/setmode.3 +++ b/lib/libc/gen/setmode.3 @@ -81,10 +81,19 @@ is to modify future file modes correctly. .Pp If the mode passed to .Fn setmode -is invalid, +is invalid or if memory cannot be allocated for the return value, .Fn setmode returns .Dv NULL . +.Pp +The value returned from +.Fn setmode +is obtained from +.Fn malloc +and should be returned to the system with +.Fn free +when the program is done with it, generally after a call to +.Fn getmode . .Sh ERRORS The .Fn setmode