aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-09-17 02:42:11 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-09-20 03:09:14 +0200
commit7333799de5fca7fe8d21424557362f5eef0b9e55 (patch)
tree123e3ad8bb92d5a397f7a4e06c3046943f12f0a4
parent61c5c89d043896217df12455aa036ee24df49ff0 (diff)
downloadffmpeg-7333799de5fca7fe8d21424557362f5eef0b9e55.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 52b872a06a..7f0d416683 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -1358,7 +1358,7 @@ static int decode_frame_png(AVCodecContext *avctx,
}
if ((ret = av_frame_ref(data, s->picture.f)) < 0)
- return ret;
+ goto the_end;
*got_frame = 1;