aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-15 02:20:58 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-10-15 06:08:34 +0200
commit676110e6d4c455acac4f234d79ab57996d43a8e7 (patch)
tree4771354990ab82e469a60cc8f477a2969fcc686c
parent0834f2056c7f1a0c09129802a003465e0ebcc9b8 (diff)
downloadffmpeg-676110e6d4c455acac4f234d79ab57996d43a8e7.tar.gz
avformat/mxfdec: cleanup if parsing the header metadata fails
Fixes memleaks Fixes: asan_static-oob_87d116_10_201.mxf Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/mxfdec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 05ac0a16e8..94fe7d4acd 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -2294,7 +2294,8 @@ static int mxf_read_header(AVFormatContext *s)
}
if (res < 0) {
av_log(s, AV_LOG_ERROR, "error reading header metadata\n");
- return res;
+ ret = res;
+ goto fail;
}
break;
} else {