Commit 530eb6ac authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/hlsenc: Free context after hls_append_segment

Fixes reading uninitialized memory
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent ce80f9fe
......@@ -389,9 +389,10 @@ static int hls_write_trailer(struct AVFormatContext *s)
av_write_trailer(oc);
hls->size = avio_tell(hls->avf->pb) - hls->start_pos;
avio_closep(&oc->pb);
avformat_free_context(oc);
av_free(hls->basename);
hls_append_segment(hls, hls->duration, hls->start_pos, hls->size);
avformat_free_context(oc);
hls->avf = NULL;
hls_window(s, 1);
hls_free_segments(hls);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment