aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-11-16 04:02:56 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-06 18:25:50 +0100
commit693d0d3ac520b5bd516b4c9165e9b04f6623d45e (patch)
treeb480a79db9e77cc473d31f7cf4a9ce0285d539ba
parentbb2c09310cbdbb1f48a1eae21f68ba8a63f4e9ba (diff)
downloadffmpeg-693d0d3ac520b5bd516b4c9165e9b04f6623d45e.tar.gz
avformat/hlsenc: Free context after hls_append_segment
Fixes reading uninitialized memory Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 530eb6acf8ee867bf00728bf7efaf505da107e17) Conflicts: libavformat/hlsenc.c (cherry picked from commit 0ac22f043bee2f1c4daf5e1044b014326325d929) Conflicts: libavformat/hlsenc.c
-rw-r--r--libavformat/hlsenc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 388a23a18b..313fcd3e6a 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -314,9 +314,10 @@ static int hls_write_trailer(struct AVFormatContext *s)
av_write_trailer(oc);
avio_closep(&oc->pb);
- avformat_free_context(oc);
av_free(hls->basename);
append_entry(hls, hls->duration);
+ avformat_free_context(oc);
+ hls->avf = NULL;
hls_window(s, 1);
free_entries(hls);