Fix the double free on buffers.