From 39319610707584f2605b12a70067c5900804fb82 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: (cherry picked from commit 34145725ce25018efc84c9d0dde7674aaff8faeb) --- .pick_status.json | 2 +- src/gallium/drivers/crocus/crocus_resource.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index cef1b8d0428..0c0cbf94df4 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 diff --git a/src/gallium/drivers/crocus/crocus_resource.c b/src/gallium/drivers/crocus/crocus_resource.c index b56c1d96276..778d2b735b8 100644 --- a/src/gallium/drivers/crocus/crocus_resource.c +++ b/src/gallium/drivers/crocus/crocus_resource.c @@ -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;