On Thu, Nov 29, 2012 at 1:38 PM, Tobias Burnus <bur...@net-b.de> wrote: > Tobias Burnus wrote: >> >> l_push_char allocates memory which is freed with free_line. However, >> currently, the memory is not always freed when calling generate_error. If >> one aborts, that's fine. However, generate_error can also set the iostat >> variable. > > > Updated version: Corrected PR number - and ensured that if convert_real > fails, free_saved is called (cf. additional test case in the PR). > > Build and regtested on x86-64-gnu-linux. > OK for the trunk?
IIRC this is supposed to be a cache than can be subsequently reused without freeing and allocating it again. So it might be better to free it once when the unit is closed. At some point this line buffer should be removed completely and replaced with the fbuf_*() machinery. But so far nobody has found the time to work on that. -- Janne Blomqvist