1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

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>
This commit is contained in:
Michael Niedermayer 2017-09-17 02:42:11 +02:00
parent ca72cd137d
commit 5480e82d77

View File

@ -1414,7 +1414,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;