diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-09-25 12:27:16 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-11-18 19:50:00 +0100 |
commit | bd5ec3601f03c8fb5514673e862223defa6f7673 (patch) | |
tree | a79a0f6362838c106987701bf81aab42af184760 /libavutil/hwcontext_qsv.c | |
parent | a185b526a9267923fb4e67f5fded90e359aea169 (diff) | |
download | ffmpeg-bd5ec3601f03c8fb5514673e862223defa6f7673.tar.gz |
avutil/hwcontext_qsv: Fix leak of AVBuffer and AVBufferRef
This av_buffer_create() does nothing but leak an AVBuffer and an
AVBufferRef (except on allocation error).
Fixes Coverity issue 1491393.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavutil/hwcontext_qsv.c')
-rw-r--r-- | libavutil/hwcontext_qsv.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c index c18747f7eb..4ed50a31a0 100644 --- a/libavutil/hwcontext_qsv.c +++ b/libavutil/hwcontext_qsv.c @@ -235,8 +235,6 @@ static AVBufferRef *qsv_pool_alloc(void *opaque, size_t size) if (s->nb_surfaces_used < hwctx->nb_surfaces) { s->nb_surfaces_used++; - av_buffer_create((uint8_t*)(s->handle_pairs_internal + s->nb_surfaces_used - 1), - sizeof(*s->handle_pairs_internal), qsv_pool_release_dummy, NULL, 0); return av_buffer_create((uint8_t*)(s->surfaces_internal + s->nb_surfaces_used - 1), sizeof(*hwctx->surfaces), qsv_pool_release_dummy, NULL, 0); } |