Module: libav Branch: master Commit: d32bdadda86b35c2960e4de877cf081b9d2dadb3
Author: Timothy Gu <[email protected]> Committer: Vittorio Giovara <[email protected]> Date: Mon Dec 5 10:21:11 2016 -0800 qsvdec: Fix memory leak on error Bug-Id: CID 1396851 Signed-off-by: Vittorio Giovara <[email protected]> --- libavcodec/qsvdec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c index b6fead0..b83b0fc 100644 --- a/libavcodec/qsvdec.c +++ b/libavcodec/qsvdec.c @@ -306,8 +306,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); _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
