mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 10:10:09 +01:00
crocus: cleanup bo exports for external objects
This might have led to a leak in firefox/webrender/webgl scenarios
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14167>
This commit is contained in:
parent
9ff086052a
commit
76da456954
1 changed files with 10 additions and 0 deletions
|
|
@ -609,6 +609,16 @@ bo_close(struct crocus_bo *bo)
|
|||
|
||||
entry = _mesa_hash_table_search(bufmgr->handle_table, &bo->gem_handle);
|
||||
_mesa_hash_table_remove(bufmgr->handle_table, entry);
|
||||
|
||||
list_for_each_entry_safe(struct bo_export, export, &bo->exports, link) {
|
||||
struct drm_gem_close close = { .handle = export->gem_handle };
|
||||
intel_ioctl(export->drm_fd, DRM_IOCTL_GEM_CLOSE, &close);
|
||||
|
||||
list_del(&export->link);
|
||||
free(export);
|
||||
}
|
||||
} else {
|
||||
assert(list_is_empty(&bo->exports));
|
||||
}
|
||||
|
||||
/* Close this object */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue