free the c_buf