This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/5666] when getline fails it still allocates a buffer
- From: "svoboda at cert dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Fri, 09 Dec 2011 16:18:26 +0000
- Subject: [Bug libc/5666] when getline fails it still allocates a buffer
- Auto-submitted: auto-generated
- References: <bug-5666-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=5666
David Svoboda <svoboda at cert dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
CC| |svoboda at cert dot org
Resolution|INVALID |
--- Comment #4 from David Svoboda <svoboda at cert dot org> 2011-12-09 16:18:26 UTC ---
The bug is in the documentation. The info page does not resolve the question of
whether or not getline() fills lineptr with a pointer that must be freed when
it also returns -1. And there are several coding examples that indicate that
the user need not free the pointer.
In other words, the docs leave the question unresolved, and several online code
samples get the answer wrong. Here is one:
http://stackoverflow.com/questions/735126/are-there-alternate-implementations-of-gnu-getline-interface
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.