This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/5666] when getline fails it still allocates a buffer


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]