diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-11-16 04:02:56 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-11-30 21:40:36 +0100 |
commit | 3bb48296ef0f54fad7d73c93a36e676ba391b037 (patch) | |
tree | baea37d76f3a07e18b6b096720ae057f583a149b | |
parent | a3fdc0b35bd78b7f89e8bd76cd7b4e912392d530 (diff) | |
download | ffmpeg-3bb48296ef0f54fad7d73c93a36e676ba391b037.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
-rw-r--r-- | libavformat/hlsenc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index cc142fa474..3fceb088f9 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -329,9 +329,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); hls_append_segment(hls, hls->duration); + avformat_free_context(oc); + hls->avf = NULL; hls_window(s, 1); hls_free_segments(hls); |