free the data buffer