diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-09-19 03:18:30 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-09-21 04:31:50 +0200 |
commit | 06e31f953ec6e4332f65e9ece72cc02166636095 (patch) | |
tree | 632fea4f3e20a76145d2819cabb0b54c613dc76d | |
parent | aed96e13c1dafd44a6995f23fadd9f64e90547d4 (diff) | |
download | ffmpeg-06e31f953ec6e4332f65e9ece72cc02166636095.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>
-rw-r--r-- | libavformat/dashdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 4f87ef981b..311a19e425 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -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; } |