libsframe: fix a memory leak in sframe_decode
sframe_decode () needs to malloc a temporary buffer of the same size as
the input buffer (containing the SFrame section bytes) when endian
flipping is needed. The decoder keeps the endian flipped contents in
this buffer for its usage. This code is necessary when the target
endianneess is not the same as host endianness.
The malloc'd buffer needs to be kept track of, so that it can freed up in
sframe_decoder_free () later.
ChangeLog:
* libsframe/sframe-impl.h (struct sframe_decoder_ctx): Add new
member to keep track of the internally malloc'd buffer.
* libsframe/sframe.c (sframe_decoder_free): Free it up.
(sframe_decode): Update the reference to the buffer.