fix fix_free_writebuf()