MFC r269326:

r269326 (by n_hibma):

Fix the example: free the memory that was allocated by getline().
This commit is contained in:
ngie 2015-12-01 07:16:05 +00:00
parent f72e7ffb57
commit 194e32cbb7

View File

@ -95,6 +95,7 @@ size_t linecap = 0;
ssize_t linelen;
while ((linelen = getline(&line, &linecap, fp)) > 0)
fwrite(line, linelen, 1, stdout);
free(line);
.Ed
.Sh COMPATIBILITY
Many application writers used the name