[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
getline() seem to behave unexpectedly
From: |
Samium Gromoff |
Subject: |
getline() seem to behave unexpectedly |
Date: |
Fri, 18 Jul 2003 11:21:44 +0400 |
User-agent: |
Wanderlust/2.11.3 (Wonderwall) SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 Emacs/21.3 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI) |
When getline returns an error status (-1), and is fed with
a NULL buffer (so it`d have to allocate on its behalf if any input),
it _does_ the allocation.
So it seems you need to free the buffer _even_ if getline
failed.
This quite may be an expected way for it to behave, but still
it is not obvious from its info page.
The glibc version in question is 3.2.3-debian-sid-latest.
regards, Samium Gromoff
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- getline() seem to behave unexpectedly,
Samium Gromoff <=