crocus: properly free resources on BO allocation failure

Iris already has the same fix applied.

Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30305>
(cherry picked from commit 34145725ce)
This commit is contained in:
Dylan Baker 2024-07-22 13:43:15 -07:00 committed by Eric Engestrom
parent 4734c85292
commit 3931961070
2 changed files with 2 additions and 2 deletions

View file

@ -1864,7 +1864,7 @@
"description": "crocus: properly free resources on BO allocation failure",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "f3630548f1da904ec6c63b43ece7e68afdb8867e",
"notes": null

View file

@ -803,7 +803,7 @@ crocus_resource_from_handle(struct pipe_screen *pscreen,
unreachable("invalid winsys handle type");
}
if (!res->bo)
return NULL;
goto fail;
res->offset = whandle->offset;
res->external_format = whandle->format;