Set linebuf to NULL after we free it, just in case.