curve: free buffers in reverse order to allocation