avformat/hls.c: Properly free prev_segments dynarray after playlist parsing
authorvkot <valery.kot@4cinsights.com>
Mon, 24 Dec 2018 09:19:55 +0000 (10:19 +0100)
committerSteven Liu <lq@chinaffmpeg.org>
Wed, 26 Dec 2018 11:22:11 +0000 (19:22 +0800)
libavformat/hls.c

index 8ad08ba..63e1abe 100644 (file)
@@ -931,6 +931,7 @@ static int parse_playlist(HLSContext *c, const char *url,
                    prev_start_seq_no, pls->start_seq_no);
         }
         free_segment_dynarray(prev_segments, prev_n_segments);
+        av_freep(&prev_segments);
     }
     if (pls)
         pls->last_load_time = av_gettime_relative();