Skip to content
Snippets Groups Projects
Commit 82aa07f8 authored by Marek Olšák's avatar Marek Olšák
Browse files

winsys/amdgpu: fix a buffer leak in amdgpu_bo_from_handle


Cc: 18.2 18.3 <mesa-stable@lists.freedesktop.org>
Reviewed-by: default avatarBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
parent 9fc1ce25
No related branches found
No related tags found
No related merge requests found
......@@ -1310,6 +1310,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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment