avformat/dashdec: Fix memleaks upon read_header failure

Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
Andreas Rheinhardt 2020-09-19 03:18:30 +02:00
parent aed96e13c1
commit 06e31f953e
1 changed files with 2 additions and 0 deletions

View 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;
}