From 34145725ce25018efc84c9d0dde7674aaff8faeb Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 22 Jul 2024 13:43:15 -0700 Subject: [PATCH] crocus: properly free resources on BO allocation failure Iris already has the same fix applied. Fixes: f3630548f1d ("crocus: initial gallium driver for Intel gfx 4-7") Reviewed-by: Nanley Chery Part-of: --- src/gallium/drivers/crocus/crocus_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/crocus/crocus_resource.c b/src/gallium/drivers/crocus/crocus_resource.c index dff1d8b5a10..28338d7a341 100644 --- a/src/gallium/drivers/crocus/crocus_resource.c +++ b/src/gallium/drivers/crocus/crocus_resource.c @@ -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;