Fix the example: free the memory that was allocated by getline().

This commit is contained in:
Nick Hibma 2014-07-31 08:28:42 +00:00
parent d18aa577d5
commit 500e59c62d

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