Commit 7333799d authored by Michael Niedermayer's avatar Michael Niedermayer

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/ffmpegReviewed-by: 's avatarJames Almer <jamrial@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 5480e82d)
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 61c5c89d
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment