The dmi_encoder_finalize function frees the strings the encoder holds.
The data written belongs to the buffer it has been written into, and is left
as it is, so an encoder is finished with rather than destroyed.
Parameters
encoder
-
Encoder to finalize, or nullptr.