mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
winsys/amdgpu: fix a buffer leak in amdgpu_bo_from_handle
Cc: 18.2 18.3 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
(cherry picked from commit 82aa07f81f)
This commit is contained in:
parent
841ae70a23
commit
bae84d6d11
1 changed files with 6 additions and 0 deletions
|
|
@ -1308,6 +1308,12 @@ static struct pb_buffer *amdgpu_bo_from_handle(struct radeon_winsys *rws,
|
|||
if (bo) {
|
||||
p_atomic_inc(&bo->base.reference.count);
|
||||
simple_mtx_unlock(&ws->bo_export_table_lock);
|
||||
|
||||
/* Release the buffer handle, because we don't need it anymore.
|
||||
* This function is returning an existing buffer, which has its own
|
||||
* handle.
|
||||
*/
|
||||
amdgpu_bo_free(result.buf_handle);
|
||||
return &bo->base;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue