readdir.3: Note that pointer returned by readdir() should not be given to free(3)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2009-03-30 11:19:47 +13:00
parent 40949ac8b0
commit 90eeb47a64
1 changed files with 4 additions and 1 deletions

View File

@ -31,7 +31,7 @@
.\" Rework discussion of non-standard structure fields.
.\" 2008-09-11, mtk, Document readdir_r().
.\"
.TH READDIR 3 2008-12-19 "" "Linux Programmer's Manual"
.TH READDIR 3 2009-03-30 "" "Linux Programmer's Manual"
.SH NAME
readdir, readdir_r \- read a directory
.SH SYNOPSIS
@ -118,6 +118,9 @@ On success,
returns a pointer to a
.I dirent
structure.
(This structure may be statically allocated; do not attempt to
.BR free (3)
it.)
If the end of the directory stream is reached, NULL is returned and
.I errno
is not changed.