Found by Coverity in FFmpeg. --- libavcodec/qsvdec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c index ea4abfa..258042d 100644 --- a/libavcodec/qsvdec.c +++ b/libavcodec/qsvdec.c @@ -305,8 +305,10 @@ static int qsv_decode(AVCodecContext *avctx, QSVContext *q, do { ret = get_surface(avctx, q, &insurf); - if (ret < 0) + if (ret < 0) { + av_freep(&sync); return ret; + } ret = MFXVideoDECODE_DecodeFrameAsync(q->session, avpkt->size ? &bs : NULL, insurf, &outsurf, sync); -- 2.10.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel