kore_buf_appendb(): free d once we are done with it.