diff options
author | Timothy Gu <timothygu99@gmail.com> | 2016-12-05 10:21:11 -0800 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2016-12-08 15:53:58 -0500 |
commit | d32bdadda86b35c2960e4de877cf081b9d2dadb3 (patch) | |
tree | bf5f0354e46ef7d8b6f6e1d5090885c588327edd | |
parent | 6a93b596c5c3af31b843d63013a7985ffeea354d (diff) | |
download | ffmpeg-streaming-d32bdadda86b35c2960e4de877cf081b9d2dadb3.zip ffmpeg-streaming-d32bdadda86b35c2960e4de877cf081b9d2dadb3.tar.gz |
qsvdec: Fix memory leak on error
Bug-Id: CID 1396851
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
-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 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); |