Commit c4034e4e 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>
(cherry picked from commit 530eb6ac)

Conflicts:

	libavformat/hlsenc.c
(cherry picked from commit 0ac22f043bee2f1c4daf5e1044b014326325d929)

Conflicts:

	libavformat/hlsenc.c
(cherry picked from commit 134d3e1c0331462ea94c78a5e13a63b20d283653)
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent d3e19509
...@@ -306,9 +306,10 @@ static int hls_write_trailer(struct AVFormatContext *s) ...@@ -306,9 +306,10 @@ static int hls_write_trailer(struct AVFormatContext *s)
av_write_trailer(oc); av_write_trailer(oc);
avio_closep(&oc->pb); avio_closep(&oc->pb);
avformat_free_context(oc);
av_free(hls->basename); av_free(hls->basename);
append_entry(hls, hls->duration); append_entry(hls, hls->duration);
avformat_free_context(oc);
hls->avf = NULL;
hls_window(s, 1); hls_window(s, 1);
free_entries(hls); free_entries(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