Browse Source

avformat/hlsenc: Free context after hls_append_segment

Fixes reading uninitialized memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 530eb6acf8)

Conflicts:

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

Conflicts:

	libavformat/hlsenc.c
tags/n2.3.6
Michael Niedermayer 11 years ago
parent
commit
693d0d3ac5
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavformat/hlsenc.c

+ 2
- 1
libavformat/hlsenc.c View File

@@ -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);


Loading…
Cancel
Save