mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 18:58:10 +02:00
gbm/dri: Fix leaking bo memory on failure path
In gbm_dri_bo_create, when modifiers are requested but not supported, do
not return NULL immediately, but first go to cleanup section to free
already allocated buffer object.
Fixes: cb9ae4273d ("dri: add loader_dri_create_image helper")
Signed-off-by: Heinrich Fink <hfink@snap.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11844>
This commit is contained in:
parent
7eb7ed8cde
commit
bff3ac0b26
1 changed files with 1 additions and 1 deletions
|
|
@ -1196,7 +1196,7 @@ gbm_dri_bo_create(struct gbm_device *gbm,
|
|||
if (modifiers && (dri->image->base.version < 14 ||
|
||||
!dri->image->createImageWithModifiers)) {
|
||||
errno = ENOSYS;
|
||||
return NULL;
|
||||
goto failed;
|
||||
}
|
||||
|
||||
bo->image = loader_dri_create_image(dri->screen, dri->image, width, height,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue