aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-19 03:18:30 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-02-27 07:20:59 +0100
commita42f19e2118d4e8df421595f0c67ef48b96f13f5 (patch)
tree75b4650686094f29ee7eed1ceb23292fa9dbd88e
parentef338de23c33f0f72143032af80d30014ef3e4ab (diff)
downloadffmpeg-a42f19e2118d4e8df421595f0c67ef48b96f13f5.tar.gz
avformat/dashdec: Fix memleaks upon read_header failure
Reviewed-by: Steven Liu <lq@chinaffmpeg.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> (cherry picked from commit 06e31f953ec6e4332f65e9ece72cc02166636095)
-rw-r--r--libavformat/dashdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index b445d9c424..a76405cdca 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -2030,6 +2030,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)
{
@@ -2161,6 +2162,7 @@ static int dash_read_header(AVFormatContext *s)
return 0;
fail:
+ dash_close(s);
return ret;
}