mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 03:50:13 +01:00
zink: fix crashing on bo allocation failure
list init occurs after mem allocation, so check this first cc: mesa-stable Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17639>
This commit is contained in:
parent
19eddeb226
commit
2aab0a9c16
1 changed files with 1 additions and 1 deletions
|
|
@ -126,7 +126,7 @@ bo_destroy(struct zink_screen *screen, struct pb_buffer *pbuf)
|
|||
struct zink_bo *bo = zink_bo(pbuf);
|
||||
|
||||
#ifdef ZINK_USE_DMABUF
|
||||
if (!bo->u.real.use_reusable_pool) {
|
||||
if (bo->mem && !bo->u.real.use_reusable_pool) {
|
||||
simple_mtx_lock(&bo->u.real.export_lock);
|
||||
list_for_each_entry_safe(struct bo_export, export, &bo->u.real.exports, link) {
|
||||
struct drm_gem_close args = { .handle = export->gem_handle };
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue