public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] getline.3: wfix.
@ 2022-07-29 20:22 enh
  2022-07-29 20:52 ` G. Branden Robinson
  2022-08-01 12:53 ` Alejandro Colomar
  0 siblings, 2 replies; 10+ messages in thread
From: enh @ 2022-07-29 20:22 UTC (permalink / raw)
  To: linux-man, Alejandro Colomar (man-pages),
	Michael Kerrisk (man-pages)

Clarify in the RETURN VALUE section that it's necessary to free the
buffer, since at least one person missed this up at the start of the
DESCRIPTION.

Signed-off-by: Elliott Hughes <enh@google.com>
---
 man3/getline.3 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/man3/getline.3 b/man3/getline.3
index 8b7357825..bad30956c 100644
--- a/man3/getline.3
+++ b/man3/getline.3
@@ -99,6 +99,10 @@ condition).
 In the event of a failure,
 .I errno
 is set to indicate the error.
+If
+.I "*lineptr"
+was set to NULL before the call, then the buffer should be freed by the
+user program even on failure.
 .SH ERRORS
 .TP
 .B EINVAL
-- 
2.37.1.455.g008518b4e5-goog

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-08-16  1:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-29 20:22 [PATCH] getline.3: wfix enh
2022-07-29 20:52 ` G. Branden Robinson
2022-07-29 20:55   ` enh
2022-08-01 12:53 ` Alejandro Colomar
2022-08-02 21:17   ` enh
2022-08-05 19:20     ` italicizing pointer stars (was: [PATCH] getline.3: wfix.) G. Branden Robinson
2022-08-05 19:40       ` Alejandro Colomar
2022-08-05 21:49         ` G. Branden Robinson
2022-08-05 21:56           ` Alejandro Colomar
2022-08-15 21:16     ` [PATCH] getline.3: wfix Alejandro Colomar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox