Merge "Make sure to release the buffer we're not using in case of an error."