rem: linebuffer->length = 0; linebuffer->size = 200; linebuffer->buffer = xmalloc (linebuffer->size);
add: memset (linebuffer, 0, sizeof *linebuffer);
context: initbuffer (struct linebuffer *linebuffer){  linebuffer->length = 0;  linebuffer->size = 200;  linebuffer->buffer = xmalloc (linebuffer->size);}