projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9fc1ce2
)
winsys/amdgpu: fix a buffer leak in amdgpu_bo_from_handle
author
Marek Olšák
<marek.olsak@amd.com>
Mon, 19 Nov 2018 23:12:12 +0000
(18:12 -0500)
committer
Marek Olšák
<marek.olsak@amd.com>
Fri, 23 Nov 2018 22:08:42 +0000
(17:08 -0500)
Cc: 18.2 18.3 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
patch
|
blob
|
history
diff --git
a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
index f49fb47b80ed6afa31bc3e642478abc12f17dbe4..3ee38b8a79f8a19f5b11d142d1d35570d60912fd 100644
(file)
--- a/
src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
+++ b/
src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
@@
-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;
}