If the buffer was dynamically allocated (because the first call failed), there should be no need to make a copy here.