]> git.sesse.net Git - ffmpeg/commitdiff
avformat/dashdec: Fix memleaks upon read_header failure
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sat, 19 Sep 2020 01:18:30 +0000 (03:18 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Mon, 21 Sep 2020 02:31:50 +0000 (04:31 +0200)
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/dashdec.c

index 4f87ef981b146d6b1d24b8b60bc7c76fd5b5e9c5..311a19e425e761ccce2d371d330366fc072caaa7 100644 (file)
@@ -2047,6 +2047,7 @@ static int copy_init_section(struct representation *rep_dest, struct representat
     return 0;
 }
 
+static int dash_close(AVFormatContext *s);
 
 static int dash_read_header(AVFormatContext *s)
 {
@@ -2178,6 +2179,7 @@ static int dash_read_header(AVFormatContext *s)
 
     return 0;
 fail:
+    dash_close(s);
     return ret;
 }