avformat/hlsenc: fix memleak at hls_write_trailer