diff options
author | Timothy Gu <timothygu99@gmail.com> | 2016-12-05 10:20:26 -0800 |
---|---|---|
committer | Timothy Gu <timothygu99@gmail.com> | 2016-12-06 13:21:08 -0800 |
commit | b6f80b16d1a82463a77352b8756e1cdcaa3a33d0 (patch) | |
tree | ecbb0302f3eb57670c63af065a74948e33bad078 /libavcodec | |
parent | 16a75304fe42d3a007c78126b6370c94ccf891f6 (diff) | |
download | ffmpeg-b6f80b16d1a82463a77352b8756e1cdcaa3a33d0.tar.gz |
qsvdec: Fix memory leak
Fixes CID1396851.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/qsvdec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c index ea4abfa5f0..258042d0e7 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); |