aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-09-17 02:42:11 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2018-01-31 22:56:14 +0100
commitfd0b42344a7a96f9401c4e1682bd9ded413d0607 (patch)
treeba61862f3d376418d3bedad145c2cd331d5077af
parenta93bbd8aa32a5bf2fcef985a963971f4fea3e051 (diff)
downloadffmpeg-fd0b42344a7a96f9401c4e1682bd9ded413d0607.tar.gz
avcodec/pngdec: Clean up on av_frame_ref() failure
Fixes: memleak Fixes: 3203/clusterfuzz-testcase-minimized-4514553595428864 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 5480e82d77770e81e897a8c217f3c7f0c13a6de1) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/pngdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index ba1b39ed8f..ac49954ad0 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -1303,7 +1303,7 @@ static int decode_frame_png(AVCodecContext *avctx,
goto the_end;
if ((ret = av_frame_ref(data, s->picture.f)) < 0)
- return ret;
+ goto the_end;
*got_frame = 1;