mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
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>
This commit is contained in:
parent
a185b526a9
commit
bd5ec3601f
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user