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>
This commit is contained in:
Dylan Baker
2024-07-22 13:43:15 -07:00
committed by Marge Bot
parent 11bc95934f
commit 34145725ce

View File

@@ -802,7 +802,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;